X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fsdnc%2Ftemplates%2Fstatefulset.yaml;h=cfeed36637231796d31cab2a1328abfe8df5a5e9;hb=4d4f7acfdb3a59c303f0312a75569d9c7b10b3fb;hp=488c050bfbce625202e4c3acd5959827ff3100a9;hpb=ecae12ede2c6f88bd69f02499dc3c361c77f3516;p=oom.git diff --git a/kubernetes/sdnc/templates/statefulset.yaml b/kubernetes/sdnc/templates/statefulset.yaml index 488c050bfb..cfeed36637 100644 --- a/kubernetes/sdnc/templates/statefulset.yaml +++ b/kubernetes/sdnc/templates/statefulset.yaml @@ -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,19 @@ 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 }}/daexim + 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 +163,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 +204,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 +242,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