Skip to content

Commit 399b21a

Browse files
committed
adopt newer top-level csr config section
1 parent 537e0bb commit 399b21a

File tree

2 files changed

+77
-61
lines changed

2 files changed

+77
-61
lines changed

charts/ziti-router/templates/configmap.yaml

Lines changed: 58 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -170,63 +170,72 @@ data:
170170
intervalAgeThreshold: 5s
171171
{{- end }}
172172
173-
edge:
174-
csr:
175-
{{- if .Values.csr.country }}
176-
country: {{ .Values.csr.country }}
177-
{{- end }}
178-
{{- if .Values.csr.province }}
179-
province: {{ .Values.csr.province }}
180-
{{- end }}
181-
{{- if .Values.csr.locality }}
182-
locality: {{ .Values.csr.locality }}
183-
{{- end }}
184-
{{- if .Values.csr.organization }}
185-
organization: {{ .Values.csr.organization }}
186-
{{- end }}
187-
{{- if .Values.csr.organizationalUnit }}
188-
organizationalUnit: {{ .Values.csr.organizationalUnit }}
189-
{{- end }}
190-
sans:
191-
dns:
192-
{{- if eq (default false .Values.csr.sans.noDefaults) false }}
193-
- localhost
194-
{{- if .Values.advertisedHost }}
195-
- {{ .Values.advertisedHost }}
196-
{{- end }}
173+
csr:
174+
{{- if .Values.csr.country }}
175+
country: {{ .Values.csr.country }}
176+
{{- end }}
177+
{{- if .Values.csr.province }}
178+
province: {{ .Values.csr.province }}
179+
{{- end }}
180+
{{- if .Values.csr.locality }}
181+
locality: {{ .Values.csr.locality }}
182+
{{- end }}
183+
{{- if .Values.csr.organization }}
184+
organization: {{ .Values.csr.organization }}
185+
{{- end }}
186+
{{- if .Values.csr.organizationalUnit }}
187+
organizationalUnit: {{ .Values.csr.organizationalUnit }}
188+
{{- end }}
189+
sans:
190+
dns:
191+
{{- if eq (default false .Values.csr.sans.noDefaults) false }}
192+
- localhost
197193
{{- if and .Values.edge.enabled .Values.edge.advertisedHost }}
198-
- {{ .Values.edge.advertisedHost }}
199-
{{- end }}
200-
{{- if and .Values.linkListeners.transport.service.enabled .Values.linkListeners.transport.advertisedHost }}
201-
- {{ .Values.linkListeners.transport.advertisedHost }}
194+
- {{ .Values.edge.advertisedHost }}
202195
{{- end }}
196+
{{- if .Values.edge.additionalListeners }}
197+
{{- range .Values.edge.additionalListeners }}
198+
- {{ .advertisedHost }}
199+
{{- end }}
203200
{{- end }}
204-
{{- range .Values.csr.sans.dns }}
205-
- {{ . | quote }}
201+
{{- if and .Values.linkListeners.transport.service.enabled .Values.linkListeners.transport.advertisedHost }}
202+
- {{ .Values.linkListeners.transport.advertisedHost }}
206203
{{- end }}
207-
ip:
208-
{{- if eq (default false .Values.csr.sans.noDefaults) false }}
209-
- 127.0.0.1
204+
{{- end }} # end if .Values.csr.sans.noDefaults
205+
{{- range .Values.csr.sans.dns }}
206+
- {{ . | quote }}
207+
{{- end }}
208+
ip:
209+
{{- if eq (default false .Values.csr.sans.noDefaults) false }}
210+
- 127.0.0.1
210211
{{- if and .Values.edge.enabled .Values.edge.service.enabled }}
211-
{{- with .Values.edge.service.loadBalancerIP }}
212-
- {{ . }}
213-
{{- end }}
214-
{{- with .Values.edge.service.externalIPs }}
215-
{{- toYaml . | nindent 4 }}
216-
{{- end }}
212+
{{- with .Values.edge.service.loadBalancerIP }}
213+
- {{ . }}
214+
{{- end }}
215+
{{- with .Values.edge.service.externalIPs }}
216+
{{- toYaml . | nindent 4 }}
217+
{{- end }}
217218
{{- end }}
218219
{{- if and .Values.linkListeners.transport.service.enabled .Values.linkListeners.transport.service.enabled }}
219-
{{- with .Values.linkListeners.transport.service.loadBalancerIP }}
220-
- {{ . }}
221-
{{- end }}
222-
{{- with .Values.linkListeners.transport.service.externalIPs }}
223-
{{- toYaml . | nindent 4 }}
224-
{{- end }}
225-
{{- end }}
226-
{{- end }}
227-
{{- range .Values.csr.sans.ip }}
228-
- {{ . | quote }}
220+
{{- with .Values.linkListeners.transport.service.loadBalancerIP }}
221+
- {{ . }}
222+
{{- end }}
223+
{{- with .Values.linkListeners.transport.service.externalIPs }}
224+
{{- toYaml . | nindent 4 }}
225+
{{- end }}
229226
{{- end }}
227+
{{- end }} # end if .Values.csr.sans.noDefaults
228+
{{- range .Values.csr.sans.ip }}
229+
- {{ . | quote }}
230+
{{- end }}
231+
email:
232+
{{- range .Values.csr.sans.email }}
233+
- {{ . | quote }}
234+
{{- end }}
235+
uri:
236+
{{- range .Values.csr.sans.uri }}
237+
- {{ . | quote }}
238+
{{- end }}
230239
231240
#transport:
232241
# ws:

charts/ziti-router/values.yaml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,29 @@ ctrl:
99
advertisedHost:
1010

1111

12-
# Certificate signing request basic data
12+
# -- Certificate signing request distinguished name and subject alternative names
1313
csr:
14-
# country: US
15-
# province: NC
16-
# locality: Charlotte
17-
# organization: NetFoundry
18-
# organizationalUnit: Ziti
14+
# -- country
15+
country:
16+
# -- state
17+
province:
18+
# -- city
19+
locality:
20+
# -- organization
21+
organization:
22+
# -- organizational unit
23+
organizationalUnit:
1924
sans:
20-
# # you could specify additional SANS here - configurations from advertise hosts and
21-
# # service's will be collected automatically
22-
# -- additional DNS SANs
25+
# -- disable computing the SANs from the advertisedHost, etc.
26+
noDefaults: false
27+
# -- additional DNS SANs
2328
dns: []
24-
# - my.additional.host
25-
# -- additional IP SANs
29+
# -- additional IP SANs
2630
ip: []
27-
# - "192.168.10.0"
31+
# -- additional email SANs
32+
email: []
33+
# -- additional URI SANs
34+
uri: []
2835

2936

3037
# listen for router links

0 commit comments

Comments
 (0)