[SDNC] Change path to daexim directory
[oom.git] / kubernetes / sdnc / templates / statefulset.yaml
index 8eec50e..92192ff 100644 (file)
@@ -62,6 +62,11 @@ spec:
           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
         - name: SDNC_DB_PASSWORD
           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
+        - name: ODL_ADMIN_USERNAME
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 10 }}
+        - name: ODL_ADMIN_PASSWORD
+          {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 10 }}
+
         volumeMounts:
         - mountPath: /config-input
           name: config-input
@@ -136,15 +141,18 @@ spec:
             name: certservice-tls-volume
       {{ end }}
 
-      - name: {{ include "common.name" . }}-chown
+      - name: {{ include "common.name" . }}-init-files
         image: {{ .Values.global.busyboxRepository | default .Values.busyboxRepository }}/{{ .Values.global.busyboxImage | default .Values.busyboxImage }}
         command:
         - sh
         args:
         - -c
-        - chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }}
+        - |
+           mkdir {{ .Values.persistence.mdsalPath }}/journal
+           mkdir {{ .Values.persistence.mdsalPath }}/snapshots
+           chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }}
 {{- if .Values.global.aafEnabled }}
-        - chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }}
+           chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }}
 {{- end }}
         volumeMounts:
 {{ include "common.certInitializer.volumeMount" . | indent 10 }}
@@ -154,13 +162,8 @@ spec:
         - name: {{ include "common.name" . }}
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-          {{- if not .Values.config.sdnr.enabled }}
-          command: ["/bin/bash"]
-          args: ["-c", "/opt/onap/sdnc/bin/startODL.sh"]
-          {{ else }}
           command: ["/bin/bash"]
-          args: ["-c", "{{ .Values.config.binDir }}/startODL.oom.sh"]
-          {{ end }}
+          args: ["-c", "/opt/onap/sdnc/bin/createLinks.sh ; /opt/onap/sdnc/bin/startODL.sh"]
           ports:
           - containerPort: {{ .Values.service.internalPort }}
           - containerPort: {{ .Values.service.internalPort2 }}
@@ -200,6 +203,14 @@ spec:
             value: "{{ .Values.replicaCount }}"
           - name: MYSQL_HOST
             value: {{ include "common.mariadbService" . }}
+          - name: MDSAL_PATH
+            value: {{ .Values.persistence.mdsalPath }}
+          - name: DAEXIM_PATH
+            value: {{ .Values.persistence.daeximPath }}
+          - name: JOURNAL_PATH
+            value: {{ .Values.persistence.journalPath }}
+          - name: SNAPSHOTS_PATH
+            value: {{ .Values.persistence.snapshotsPath }}
           - name: JAVA_HOME
             value: "{{ .Values.config.javaHome}}"
           - name: JAVA_OPTS
@@ -230,15 +241,12 @@ spec:
           - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
             name: sdnc-logging-cfg-config
             subPath: org.ops4j.pax.logging.cfg
-          - mountPath: {{ .Values.config.binDir }}/startODL.sh
-            name: bin
-            subPath: startODL.sh
-          - mountPath: {{ .Values.config.binDir }}/startODL.oom.sh
-            name: bin
-            subPath: startODL.oom.sh
           - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
             name: bin
             subPath: installSdncDb.sh
+          - mountPath: {{ .Values.config.binDir }}/createLinks.sh
+            name: bin
+            subPath: createLinks.sh
           - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
             name: properties
             subPath: aaiclient.properties
@@ -273,6 +281,9 @@ spec:
           - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
             name: properties
             subPath: org.opendaylight.controller.cluster.datastore.cfg
+          - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.aaa.filterchain.cfg
+            name: properties
+            subPath: org.opendaylight.aaa.filterchain.cfg
           - mountPath: {{ .Values.config.odl.binDir }}/setenv
             name: properties
             subPath: setenv
@@ -282,8 +293,16 @@ spec:
           - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-state-provider.properties
             name: properties
             subPath: mountpoint-state-provider.properties
+<<<<<<< HEAD   (a66d33 Merge "[MUSIC] Update certificate" into guilin)
+          {{ if .Values.global.cmpv2Enabled }}
           - mountPath: {{ .Values.global.platform.certServiceClient.envVariables.cert_path }}
             name: certs
+          {{- end }}
+=======
+          - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.daexim.cfg
+            name: properties
+            subPath: org.opendaylight.daexim.cfg
+>>>>>>> CHANGE (a86300 Change path to daexim directory)
           resources:
 {{ include "common.resources" . | indent 12 }}
         {{- if .Values.nodeSelector }}
@@ -334,12 +353,14 @@ spec:
         - name: properties
           emptyDir:
             medium: Memory
+        {{ if .Values.global.cmpv2Enabled }}
         - name: certs
           emptyDir:
             medium: Memory
         - name: certservice-tls-volume
           secret:
             secretName: {{ .Values.global.platform.certServiceClient.secret.name }}
+        {{- end }}
   {{ if not .Values.persistence.enabled }}
         - name: {{ include "common.fullname" . }}-data
           emptyDir: {}