Skip to content

Commit f615929

Browse files
committed
K8s: Disable annotation when ingress.tls[0].secretName is null
Signed-off-by: Viet Nguyen Duc <[email protected]>
1 parent 3a61a7c commit f615929

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

charts/selenium-grid/templates/_helpers.tpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ nginx.ingress.kubernetes.io/use-http2: {{ .useHttp2 | quote }}
135135
nginx.ingress.kubernetes.io/proxy-ssl-secret: {{ tpl .sslSecret $ | quote }}
136136
{{- else if (empty $.Values.ingress.tls) }}
137137
nginx.ingress.kubernetes.io/proxy-ssl-secret: {{ tpl (printf "%s/%s" $.Release.Namespace (include "seleniumGrid.tls.fullname" $)) $ | quote }}
138-
{{- else }}
139-
nginx.ingress.kubernetes.io/proxy-ssl-secret: {{ tpl (printf "%s/%s" $.Release.Namespace (index $.Values.ingress.tls 0).secretName) $ | quote }}
138+
{{- else if (index $.Values.ingress.tls 0).secretName }}
139+
nginx.ingress.kubernetes.io/proxy-ssl-secret: {{ tpl (printf "%s" $.Release.Namespace (index $.Values.ingress.tls 0).secretName) $ | quote }}
140140
{{- end }}
141141
{{- end }}
142142
{{- with .upstreamKeepalive }}

charts/selenium-grid/values.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ ingress:
209209
# -- Specify a Secret with the certificate `tls.crt`, key `tls.key`, the name in the form "namespace/secretName" for NGINX Ingress Controller
210210
sslSecret: ""
211211
# -- Enables or disables HTTP/2 support in secure connections via annotations for NGINX Ingress Controller
212-
useHttp2: true
212+
useHttp2: false
213213
# -- Apply upstream keepalive settings once HTTP/2 is enabled
214214
upstreamKeepalive:
215215
# -- Set keepalive connections to corresponding annotations for NGINX Ingress Controller

tests/charts/templates/render/dummy_solution.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ selenium-grid:
9191
tls:
9292
- hosts:
9393
- '*.my.domain.com'
94+
secretName: "selenium/my-external-secret"
9495

9596
isolateComponents: true
9697

0 commit comments

Comments
 (0)