Skip to content

Commit b58c416

Browse files
reytech-devRafalKorepta
authored andcommitted
avoid empty dnsNames if custom issuerRef is set
1 parent b3090fc commit b58c416

File tree

3 files changed

+32
-7
lines changed

3 files changed

+32
-7
lines changed

charts/redpanda/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type: application
2323
# The chart version and the app version are not the same and will not track
2424
# together. The chart version is a semver representation of changes to this
2525
# chart.
26-
version: 5.7.23
26+
version: 5.7.25
2727

2828
# The app version is the default version of Redpanda to install.
2929
# ** NOTE for maintainers: please ensure the artifacthub image annotation is updated before merging
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
---
17+
tls:
18+
enabled: true
19+
certs:
20+
default:
21+
issuerRef:
22+
name: custom-internal-issuer-ref
23+
kind: ClusterIssuer
24+
25+
external:
26+
enabled: false

charts/redpanda/templates/certs.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ metadata:
3737
{{- end }}
3838
spec:
3939
dnsNames:
40-
{{- if (empty $data.issuerRef) }}
40+
{{- if (tpl ($values.external.domain | default "") $) }}
41+
- "{{ tpl $values.external.domain $ }}"
42+
- "*.{{ tpl $values.external.domain $ }}"
43+
{{ else }}
4144
- {{ template "redpanda.fullname" $ }}-cluster.{{ printf "%s.%s.svc.%s" $service $ns $domain }}
4245
- {{ template "redpanda.fullname" $ }}-cluster.{{ printf "%s.%s.svc" $service $ns }}
4346
- {{ template "redpanda.fullname" $ }}-cluster.{{ printf "%s.%s" $service $ns }}
@@ -51,10 +54,6 @@ spec:
5154
- {{ printf "*.%s.%s.svc" $service $ns | quote }}
5255
- {{ printf "*.%s.%s" $service $ns | quote }}
5356
{{- end }}
54-
{{- if (tpl ($values.external.domain | default "") $) }}
55-
- "{{ tpl $values.external.domain $ }}"
56-
- "*.{{ tpl $values.external.domain $ }}"
57-
{{- end }}
5857
duration: {{ $d | default "43800h" }}
5958
isCA: false
6059
secretName: {{ template "redpanda.fullname" $ }}-{{ $name }}-cert
@@ -103,4 +102,4 @@ spec:
103102
group: cert-manager.io
104103
{{- end }}
105104
{{- end }}
106-
{{- end }}
105+
{{- end }}

0 commit comments

Comments
 (0)