[MODELING]Modify the owner of static directory to onap instead of root
[oom.git] / kubernetes / modeling / charts / modeling-etsicatalog / templates / deployment.yaml
index fb31b8b..0c1ba30 100644 (file)
@@ -47,6 +47,16 @@ spec:
         image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         name: {{ include "common.name" . }}-readiness
+      - command:
+        - /bin/sh
+        - -c
+        - chown -R 1000:1000 /service/modeling/etsicatalog/static
+        image: "{{ include "common.repository" . }}/{{ .Values.initImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        name: {{ include "common.name" . }}-init
+        volumeMounts:
+        - name: {{ include "common.fullname" . }}-etsicatalog
+          mountPath: /service/modeling/etsicatalog/static
       containers:
         - name: {{ include "common.name" . }}
           command:
@@ -73,12 +83,16 @@ spec:
             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
             periodSeconds: {{ .Values.readiness.periodSeconds }}
           env:
+          - name: MSB_PROTO
+            value: "{{ .Values.global.config.msbProtocol }}"
+          - name: SSL_ENABLED
+            value: "{{ .Values.global.config.ssl_enabled }}"
           - name: MSB_ADDR
             value: "{{ .Values.global.config.msbServiceName }}:{{ .Values.global.config.msbPort }}"
           - name: MYSQL_ADDR
             value: {{ (index .Values "mariadb-galera" "service" "name") }}:{{ (index .Values "mariadb-galera" "service" "internalPort") }}
           - name: MYSQL_ROOT_PASSWORD
-            {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-root-pass" "key" "password") | indent 12}}
+            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-pass" "key" "password") | indent 12}}
           volumeMounts:
           - name: {{ include "common.fullname" . }}-etsicatalog
             mountPath: /service/modeling/etsicatalog/static