Merge "No root access to mariadb from portal app"
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Tue, 18 Aug 2020 14:25:53 +0000 (14:25 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 18 Aug 2020 14:25:53 +0000 (14:25 +0000)
kubernetes/portal/components/portal-mariadb/templates/deployment.yaml
kubernetes/portal/components/portal-mariadb/values.yaml

index bcd223c..ec6cc50 100644 (file)
@@ -34,6 +34,13 @@ spec:
         app: {{ include "common.name" . }}
         release: {{ include "common.release" . }}
     spec:
+      initContainers:
+      - name: volume-permissions
+        image: "{{ .Values.global.busyboxRepository }}/{{ .Values.global.busyboxImage }}"
+        command: ['sh', '-c', 'chmod -R 777 /var/lib/mysql']
+        volumeMounts:
+        - mountPath: /var/lib/mysql
+          name: mariadb-data
       containers:
         - name: {{ include "common.name" . }}
           image: "{{ include "common.repository" . }}/{{ .Values.image }}"
index 08157f7..40b1775 100644 (file)
@@ -21,7 +21,8 @@ global: # global defaults
   persistence: {}
   readinessRepository: oomk8s
   readinessImage: readiness-check:2.0.0
-
+  busyBoxImage: busybox:1.30
+  busyBoxRepository: docker.io
 
 # application image
 repository: nexus3.onap.org:10001