Skip to content

Commit bca5238

Browse files
author
cyril.cros
committed
Use kubernetes TLS secret for certs
Users can still use the previous form but get a deprecation warning.
1 parent e33ff33 commit bca5238

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

chart/templates/NOTES.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{- if (and $.Values.certificatesSecret.fullChainName $.Values.certificatesSecret.chainName $.Values.certificatesSecret.keyName) }}
2+
You can now directly use a secret of type `kubernetes.io/tls` for your `certificatesSecret` instead of manually packing your certificates
3+
into an `Opaque` secret with `fullChainName` / `keyName` / `chainName` entries. This older packing method will become deprecated.
4+
Please migrate to the Kubernetes TLS Secret format. See https://kubernetes.io/docs/concepts/configuration/secret/#tls-secrets for details.
5+
{{- end }}

chart/templates/proxy-deployment.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,21 @@ spec:
156156
- name: config-certificates
157157
secret:
158158
secretName: {{ $.Values.certificatesSecret.secretName }}
159-
{{- if (and $.Values.certificatesSecret.fullChainName $.Values.certificatesSecret.chainName $.Values.certificatesSecret.keyName) }}
160159
items:
160+
{{- if (and $.Values.certificatesSecret.fullChainName $.Values.certificatesSecret.chainName $.Values.certificatesSecret.keyName) }}
161161
- key: {{ $.Values.certificatesSecret.fullChainName }}
162162
path: fullchain.pem
163163
- key: {{ $.Values.certificatesSecret.chainName }}
164164
path: chain.pem
165165
- key: {{ $.Values.certificatesSecret.keyName }}
166166
path: privkey.pem
167+
{{- else }}
168+
- key: tls.crt
169+
path: fullchain.pem
170+
- key: tls.key
171+
path: privkey.pem
167172
{{- end }}
168173
{{- end }}
169174
{{ include "gitpod.container.configmap.volumes" $this | indent 6 }}
170175
{{ toYaml .Values.defaults | indent 6 }}
171-
{{ end }}
176+
{{ end }}

0 commit comments

Comments
 (0)