Merge "[GENERAL] Print helm binary used"
[oom.git] / kubernetes / sdnc / templates / statefulset.yaml
index 51c50e4..96fa337 100644 (file)
@@ -114,7 +114,6 @@ spec:
         args:
         - -c
         - |
-           mkdir {{ .Values.persistence.mdsalPath }}/daexim
            mkdir {{ .Values.persistence.mdsalPath }}/journal
            mkdir {{ .Values.persistence.mdsalPath }}/snapshots
            chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }}
@@ -129,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:
@@ -198,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 }}
@@ -264,6 +274,9 @@ spec:
           - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-state-provider.properties
             name: properties
             subPath: mountpoint-state-provider.properties
+          - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.daexim.cfg
+            name: properties
+            subPath: org.opendaylight.daexim.cfg
           resources:
 {{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}