Sylvain Desbureaux | aadf545 | 2020-03-18 18:13:51 +0100 | [diff] [blame] | 1 | {{- define "so.certificate.container_importer" -}} |
| 2 | - name: {{ include "common.name" . }}-certs-importer |
| 3 | image: "{{ include "common.repository" . }}/{{ .Values.global.soBaseImage }}" |
| 4 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 5 | command: |
| 6 | - "/bin/sh" |
| 7 | args: |
| 8 | - "-c" |
| 9 | - "update-ca-certificates --fresh && \ |
| 10 | cp -r {{ .Values.global.certificates.path }}/* /certificates" |
| 11 | volumeMounts: |
| 12 | - name: {{ include "common.name" . }}-certificates |
| 13 | mountPath: /certificates |
| 14 | - name: {{ include "common.name" . }}-onap-certificates |
| 15 | mountPath: {{ .Values.global.certificates.share_path }} |
| 16 | {{- end -}} |
| 17 | |
| 18 | {{- define "so.certificate.volume-mounts" -}} |
| 19 | - name: {{ include "common.name" . }}-certificates |
| 20 | mountPath: {{ .Values.global.certificates.path }} |
| 21 | - name: {{ include "common.name" . }}-onap-certificates |
| 22 | mountPath: {{ .Values.global.certificates.share_path }} |
| 23 | {{- end -}} |
| 24 | |
| 25 | {{- define "so.certificate.volumes" -}} |
| 26 | - name: {{ include "common.name" . }}-certificates |
| 27 | emptyDir: |
| 28 | medium: Memory |
| 29 | - name: {{ include "common.name" . }}-onap-certificates |
| 30 | secret: |
| 31 | secretName: {{ include "common.secret.getSecretNameFast" (dict "global" . "uid" "so-onap-certs") }} |
| 32 | {{- end -}} |