File tree Expand file tree Collapse file tree 3 files changed +24
-7
lines changed Expand file tree Collapse file tree 3 files changed +24
-7
lines changed Original file line number Diff line number Diff line change 1+ ---
12apiVersion : v1
23kind : ConfigMap
34metadata :
45 name : {{ printf "%s-certificates" (include "geohealthcheck.fullname" .) | squote }}
56 labels :
67 {{- include "geohealthcheck.labels" . | nindent 4 }}
78data :
8- my-ca.crt : |
9- -----BEGIN CERTIFICATE---- -
10- MIID... (your certificate content here)
11- -----END CERTIFICATE-----
9+ {{- range $filename, $certificate := .Values.additionalCertificates }}
10+ {{ $filename -}} : > -
11+ {{- $ certificate | nindent 4 }}
12+ {{- end -}}
Original file line number Diff line number Diff line change 3131 initContainers :
3232 - name : update-ca-certificates
3333 image : ' {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}'
34- command : ['sh', '-c', 'cp /custom-ca/my-ca.crt /usr/local/share/ca-certificates/ && update-ca-certificates']
34+ command : ['sh', '-c', 'cp /custom-ca/* /usr/local/share/ca-certificates/ && update-ca-certificates']
3535 volumeMounts :
3636 - name : custom-ca-cert
3737 mountPath : /custom-ca
@@ -51,12 +51,18 @@ spec:
5151 {{- toYaml .Values.readinessProbe | nindent 12 }}
5252 resources :
5353 {{- toYaml .Values.resources | nindent 12 }}
54- {{- with .Values.volumeMounts }}
5554 volumeMounts :
55+ # TODO: loop through certs
56+ - name : custom-ca-cert
57+ mountPath : /etc/ssl/certs/my-ca.crt
58+ {{- with .Values.volumeMounts }}
5659 {{- toYaml . | nindent 12 }}
5760 {{- end }}
58- {{- with .Values.volumes }}
5961 volumes :
62+ - name : custom-ca-cert
63+ configMap :
64+ name : custom-ca-cert
65+ {{- with .Values.volumes }}
6066 {{- toYaml . | nindent 8 }}
6167 {{- end }}
6268 {{- with .Values.nodeSelector }}
Original file line number Diff line number Diff line change @@ -141,6 +141,16 @@ service:
141141 # https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
142142 type : ' ClusterIP'
143143
144+ additionalCertificates :
145+ cert1.crt : |
146+ -----BEGIN CERTIFICATE-----
147+ MIID... (your certificate content here)
148+ -----END CERTIFICATE-----
149+ cert2.crt : |
150+ -----BEGIN CERTIFICATE-----
151+ MIID... (your certificate content here)
152+ -----END CERTIFICATE-----
153+
144154# This block is for setting up the ingress for more information can be found
145155# here: https://kubernetes.io/docs/concepts/services-networking/ingress/
146156ingress :
You can’t perform that action at this time.
0 commit comments