summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/certManagerCertificate
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2021-02-19 16:41:28 +0000
committerGerrit Code Review <gerrit@onap.org>2021-02-19 16:41:28 +0000
commit98103f2f50a52c49d6d71fb741db4fd2bd88382b (patch)
treea31056d55331afad46e7cae2f09f52d80544d17e /kubernetes/common/certManagerCertificate
parent55283072482d0a0913783fb9cde93cd37b6bd97d (diff)
parentaf82e2bec90f84bdfcda11ff7c240985b6ab8201 (diff)
Merge "[SDNC] Fix issue with certs from CMPv2 by Netconf (TLS)"
Diffstat (limited to 'kubernetes/common/certManagerCertificate')
-rw-r--r--kubernetes/common/certManagerCertificate/templates/_certificate.tpl20
1 files changed, 19 insertions, 1 deletions
diff --git a/kubernetes/common/certManagerCertificate/templates/_certificate.tpl b/kubernetes/common/certManagerCertificate/templates/_certificate.tpl
index 4e43f621de..f820c30ca9 100644
--- a/kubernetes/common/certManagerCertificate/templates/_certificate.tpl
+++ b/kubernetes/common/certManagerCertificate/templates/_certificate.tpl
@@ -181,8 +181,10 @@ spec:
{{- $subchartGlobal := mergeOverwrite (deepCopy $initRoot.global) $dot.Values.global -}}
{{- range $i, $certificate := $dot.Values.certificates -}}
{{- $mountPath := $certificate.mountPath -}}
-- mountPath: {{ $mountPath }}
+- mountPath: {{ (printf "%s/secret-%d" $mountPath $i) }}
name: certmanager-certs-volume-{{ $i }}
+- mountPath: {{ $mountPath }}
+ name: certmanager-certs-volume-{{ $i }}-dir
{{- end -}}
{{- end -}}
@@ -194,6 +196,8 @@ spec:
{{- range $i, $certificate := $certificates -}}
{{- $name := include "common.fullname" $dot -}}
{{- $certificatesSecretName := default (printf "%s-secret-%d" $name $i) $certificate.secretName -}}
+- name: certmanager-certs-volume-{{ $i }}-dir
+ emptyDir: {}
- name: certmanager-certs-volume-{{ $i }}
projected:
sources:
@@ -217,3 +221,17 @@ spec:
{{- end }}
{{- end -}}
{{- end -}}
+
+{{- define "common.certManager.linkVolumeMounts" -}}
+{{- $dot := default . .dot -}}
+{{- $initRoot := default $dot.Values.certManagerCertificate .initRoot -}}
+{{- $subchartGlobal := mergeOverwrite (deepCopy $initRoot.global) $dot.Values.global -}}
+{{- $certificates := $dot.Values.certificates -}}
+{{- $certsLinkCommand := "" -}}
+ {{- range $i, $certificate := $certificates -}}
+ {{- $destnationPath := (required "'mountPath' for Certificate is required." $certificate.mountPath) -}}
+ {{- $sourcePath := (printf "%s/secret-%d/*" $destnationPath $i) -}}
+ {{- $certsLinkCommand = (printf "ln -s %s %s; %s" $sourcePath $destnationPath $certsLinkCommand) -}}
+ {{- end -}}
+{{ $certsLinkCommand }}
+{{- end -}}