aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/sdnc/templates
diff options
context:
space:
mode:
authorPiotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com>2021-02-11 11:23:31 +0100
committerPiotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com>2021-02-19 15:33:21 +0000
commitaf82e2bec90f84bdfcda11ff7c240985b6ab8201 (patch)
treea1c1885dad1ff402c5f9639e58680135369898c2 /kubernetes/sdnc/templates
parent69e8c90cb3c8171d397319b4339b3ce79da07b9c (diff)
[SDNC] Fix issue with certs from CMPv2 by Netconf (TLS)
- correct cmpv2Certificate to take outputType from 'certificates' - add postStart hook for CertManagerIntegration to make cert dir writable - add setting ODL_CERT_DIR env Issue-ID: SDNC-1477 Signed-off-by: Piotr Marcinkiewicz <piotr.marcinkiewicz@nokia.com> Change-Id: I4531392cc4f113b173d10a27b98b1fe97d6faa4d
Diffstat (limited to 'kubernetes/sdnc/templates')
-rw-r--r--kubernetes/sdnc/templates/statefulset.yaml13
1 files changed, 12 insertions, 1 deletions
diff --git a/kubernetes/sdnc/templates/statefulset.yaml b/kubernetes/sdnc/templates/statefulset.yaml
index 7441dacd23..96fa3378fb 100644
--- a/kubernetes/sdnc/templates/statefulset.yaml
+++ b/kubernetes/sdnc/templates/statefulset.yaml
@@ -128,6 +128,13 @@ spec:
- name: {{ include "common.name" . }}
image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ {{- if and .Values.global.cmpv2Enabled .Values.global.CMPv2CertManagerIntegration }}
+ {{- $linkCommand := include "common.certManager.linkVolumeMounts" . }}
+ lifecycle:
+ postStart:
+ exec:
+ command: ["sh", "-c", {{$linkCommand | quote}} ]
+ {{- end }}
command: ["/bin/bash"]
args: ["-c", "/opt/onap/sdnc/bin/createLinks.sh ; /opt/onap/sdnc/bin/startODL.sh"]
ports:
@@ -197,7 +204,11 @@ spec:
{{- if .Values.config.sdnr.sdnrdbTrustAllCerts }}
- name: SDNRDBTRUSTALLCERTS
value: "true"
- {{ end }}
+ {{- end }}
+ {{- if .Values.global.cmpv2Enabled }}
+ - name: ODL_CERT_DIR
+ value: {{ (mustFirst (.Values.certificates)).mountPath }}
+ {{- end }}
volumeMounts:
{{ include "common.certInitializer.volumeMount" . | indent 10 }}