Skip to content

Commit 8a2f5a0

Browse files
author
cyril.cros
committed
allow the use of Kubernetes TLS secrets for http-certs
1 parent 0f4562a commit 8a2f5a0

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
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
@@ -165,16 +165,21 @@ spec:
165165
- name: config-certificates
166166
secret:
167167
secretName: {{ $.Values.certificatesSecret.secretName }}
168-
{{- if (and $.Values.certificatesSecret.fullChainName $.Values.certificatesSecret.chainName $.Values.certificatesSecret.keyName) }}
169168
items:
169+
{{- if (and $.Values.certificatesSecret.fullChainName $.Values.certificatesSecret.chainName $.Values.certificatesSecret.keyName) }}
170170
- key: {{ $.Values.certificatesSecret.fullChainName }}
171171
path: fullchain.pem
172172
- key: {{ $.Values.certificatesSecret.chainName }}
173173
path: chain.pem
174174
- key: {{ $.Values.certificatesSecret.keyName }}
175175
path: privkey.pem
176+
{{- else }}
177+
- key: tls.crt
178+
path: fullchain.pem
179+
- key: tls.key
180+
path: privkey.pem
176181
{{- end }}
177182
{{- end }}
178183
{{ include "gitpod.container.configmap.volumes" $this | indent 6 }}
179184
{{ toYaml .Values.defaults | indent 6 }}
180-
{{ end }}
185+
{{ end }}

chart/templates/registry-facade-daemonset.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,19 @@ spec:
122122
- name: https-certificates
123123
secret:
124124
secretName: {{ .Values.certificatesSecret.secretName }}
125-
{{- if (and $.Values.certificatesSecret.fullChainName $.Values.certificatesSecret.chainName $.Values.certificatesSecret.keyName) }}
126125
items:
126+
{{- if (and $.Values.certificatesSecret.fullChainName $.Values.certificatesSecret.chainName $.Values.certificatesSecret.keyName) }}
127127
- key: {{ $.Values.certificatesSecret.fullChainName }}
128128
path: fullchain.pem
129129
- key: {{ $.Values.certificatesSecret.chainName }}
130130
path: chain.pem
131131
- key: {{ $.Values.certificatesSecret.keyName }}
132132
path: privkey.pem
133+
{{- else }}
134+
- key: tls.crt
135+
path: fullchain.pem
136+
- key: tls.key
137+
path: privkey.pem
133138
{{- end }}
134139
{{- end }}
135140
{{ toYaml .Values.defaults | indent 6 }}

0 commit comments

Comments
 (0)