diff options
author | Sylvain Desbureaux <sylvain.desbureaux@orange.com> | 2021-02-16 10:29:00 +0100 |
---|---|---|
committer | Sylvain Desbureaux <sylvain.desbureaux@orange.com> | 2021-02-18 07:15:36 +0000 |
commit | e1b8ac66737bb1a9abecc57ca1733bfa630dc151 (patch) | |
tree | 519a11b39a7f06527b20ed01741b719f72cb524f /kubernetes/appc/components/appc-cdt/templates/deployment.yaml | |
parent | d316c397dacae3994fcd260cda14ce872f664581 (diff) |
[APPC][CDT] Automatically retrieve certificates
Instead of using hardcoded certificates in container, use
certInitializer in order to retrieve them.
Issue-ID: OOM-2682
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Change-Id: I93b7a1a0bddf2540e222ec4406d0cfd12f6f5e5e
Diffstat (limited to 'kubernetes/appc/components/appc-cdt/templates/deployment.yaml')
-rw-r--r-- | kubernetes/appc/components/appc-cdt/templates/deployment.yaml | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/kubernetes/appc/components/appc-cdt/templates/deployment.yaml b/kubernetes/appc/components/appc-cdt/templates/deployment.yaml index ebcabf5112..fb15897ae1 100644 --- a/kubernetes/appc/components/appc-cdt/templates/deployment.yaml +++ b/kubernetes/appc/components/appc-cdt/templates/deployment.yaml @@ -35,7 +35,7 @@ spec: app: {{ include "common.name" . }} release: {{ include "common.release" . }} spec: - initContainers: + initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }} containers: - name: {{ include "common.name" . }} image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }} @@ -65,10 +65,17 @@ spec: # for nodePort3. This value will be configured in appc main chart in appc-cdt section. - name: CDT_PORT value: "{{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.nodePort3 }}" - volumeMounts: + - name: HTTPS_KEY_FILE + value: {{ .Values.certInitializer.credsPath }}/certs/key.pem + - name: HTTPS_CERT_FILE + value: {{ .Values.certInitializer.credsPath }}/certs/cert.pem + volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }} - mountPath: /etc/localtime name: localtime readOnly: true + - mountPath: /opt/startCdt.sh + name: entrypoint + subPath: startCdt.sh resources: {{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} @@ -79,9 +86,13 @@ spec: affinity: {{ toYaml .Values.affinity | indent 10 }} {{- end }} - volumes: + volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }} - name: localtime hostPath: path: /etc/localtime + - name: entrypoint + configMap: + name: {{ include "common.fullname" . }}-entrypoint + defaultMode: 0755 imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" |