Merge "[DMAAP] DMaaP ServiceMesh compatibility"
[oom.git] / kubernetes / aaf / components / aaf-templates / templates / _initContainers.tpl
index 69d954a..7553152 100644 (file)
 */}
 
 {{- define "aaf.permissionFixer" -}}
-- name: fix-permission
+- name: onboard-identity-and-fix-permission
   command:
   - /bin/sh
   args:
   - -c
   - |
+    echo "*** Move files from configmap to emptyDir"
+    cp -L /config-input-identity/* /config-identity/
+    echo "*** set righ user to the different folders"
+    chown -R 1000:1000 /config-identity
     chown -R 1000:1000 /opt/app/aaf
     chown -R 1000:1000 /opt/app/osaaf
-  image: "{{ .Values.global.busyboxRepository }}/{{ .Values.global.busyboxImage }}"
+  image: {{ include "repositoryGenerator.image.busybox" . }}
   imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
   volumeMounts:
   - mountPath: /opt/app/osaaf
     name: aaf-config-vol
+  - mountPath: /config-input-identity
+    name: config-init-identity
+  - mountPath: /config-identity
+    name: config-identity
   resources:
     limits:
       cpu: 100m
@@ -39,7 +47,7 @@
 
 {{- define "aaf.podConfiguration" }}
 - name: {{ include "common.name" . }}-config-container
-  image: {{ .Values.global.repository }}/{{.Values.global.aaf.config.image}}
+  image: {{ include "repositoryGenerator.repository" . }}/{{.Values.global.aaf.config.image}}
   imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
   command:
   - /bin/bash
@@ -108,7 +116,7 @@ initContainers:
       fieldRef:
         apiVersion: v1
         fieldPath: metadata.namespace
-  image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+  image: {{ include "repositoryGenerator.image.readiness" . }}
   imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
   resources:
     limits: