Merge "Change ownership of persistent vol mount"
authorAlexis de Talhouët <adetalhouet89@gmail.com>
Thu, 9 May 2019 00:36:45 +0000 (00:36 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 9 May 2019 00:36:45 +0000 (00:36 +0000)
kubernetes/sdnc/templates/statefulset.yaml
kubernetes/sdnc/values.yaml

index 9728fab..d60319f 100644 (file)
@@ -46,7 +46,15 @@ spec:
               fieldPath: metadata.namespace
         image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-        name: {{ include "common.name" . }}-readiness
+        name: {{ include "common.name" . }}-readiness   
+      - name: {{ include "common.name" . }}-chown
+        image: "busybox"
+        command: ["sh", "-c", "chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }} ; chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certpersistence.certPath }}"]
+        volumeMounts:
+          - mountPath: {{ .Values.persistence.mdsalPath }}
+            name: {{ include "common.fullname" . }}-mdsal
+          - mountPath: {{ .Values.certpersistence.certPath }}
+            name: {{ include "common.fullname" . }}-certs
       containers:
         - name: {{ include "common.name" . }}
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
index 954b19b..0cd5b60 100644 (file)
@@ -39,6 +39,8 @@ debugEnabled: false
 
 # application configuration
 config:
+  odlUid: 100
+  odlGid: 101
   odlPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
   dbRootPassword: secretpassword
   dbSdnctlPassword: gamma