Skip to content

Commit

Permalink
Fix issue with consol.tlsSecretName (#4705)
Browse files Browse the repository at this point in the history
  • Loading branch information
nwmac authored Oct 20, 2020
1 parent 3d6d0f7 commit 39522f5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion deploy/kubernetes/console/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ spec:
- name: "{{ .Release.Name }}-cert-volume"
secret:
{{- if .Values.console.tlsSecretName }}
secretName: "{{ .values.console.tlsSecretName }}"
secretName: "{{ .Values.console.tlsSecretName }}"
{{- else }}
secretName: "{{ .Release.Name }}-cert"
{{- end }}
Expand Down
25 changes: 25 additions & 0 deletions deploy/kubernetes/console/tests/custom-cert_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

suite: test stratos custom certificate
templates:
- deployment.yaml
tests:
- it: should use cert if console.tlsSecretName set
set:
console.tlsSecretName: my-cert
asserts:
- equal:
path: spec.template.spec.volumes[1]
value:
name: RELEASE-NAME-cert-volume
secret:
secretName: my-cert
- it: should use default cert if console.tlsSecretName not set
release:
name: unitest
asserts:
- equal:
path: spec.template.spec.volumes[1]
value:
name: unitest-cert-volume
secret:
secretName: unitest-cert

0 comments on commit 39522f5

Please sign in to comment.