AAF OOM 2.1.20
[oom.git] / kubernetes / aaf / charts / aaf-locate / templates / deployment.yaml
index e1a9c04..cc7f191 100644 (file)
@@ -18,7 +18,7 @@ metadata:
   labels:
     app: {{ include "common.name" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
+    release: {{ include "common.release" . }}
     heritage: {{ .Release.Service }}
   name: {{ include "common.fullname" . }}
   namespace: {{ include "common.namespace" . }}
@@ -28,9 +28,26 @@ spec:
     metadata:
       labels:
         app: {{ include "common.name" . }}
-        release: {{ .Release.Name }}
+        release: {{ include "common.release" . }}
     spec:
       initContainers:
+      - name: fix-permission
+        command:
+        - /bin/sh
+        args:
+        - -c
+        - |
+          chmod -R 775 /opt/app/aaf/status
+          chown -R 1000:1000 /opt/app/aaf/status
+          chmod -R 775 /opt/app/osaaf
+          chown -R 1000:1000 /opt/app/osaaf
+        image: "{{ .Values.global.busyboxRepository }}/{{ .Values.global.busyboxImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        volumeMounts:
+          - mountPath: /opt/app/aaf/status
+            name: aaf-status-vol
+          - mountPath: /opt/app/osaaf
+            name: aaf-config-vol
       - name: {{ include "common.name" . }}-config-container
         image: {{ .Values.global.repository }}/{{.Values.global.aaf.config.image}}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
@@ -114,9 +131,9 @@ spec:
           path: /etc/localtime
       - name: aaf-status-vol
         persistentVolumeClaim:
-          claimName: {{ .Release.Name }}-aaf-status
+          claimName: {{ include "common.release" . }}-aaf-status
       - name: aaf-config-vol
         persistentVolumeClaim:
-          claimName: {{ .Release.Name }}-aaf-config
+          claimName: {{ include "common.release" . }}-aaf-config
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"