heritage: {{ .Release.Service }}
 data:
 {{ tpl (.Files.Glob "resources/cass-init-dats/*").AsConfig . | indent 2 }}
----
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-cass-init-data
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ include "common.release" . }}
-    heritage: {{ .Release.Service }}
-data:
-{{ tpl (.Files.Glob "resources/cass-init-data/*").AsConfig . | indent 2 }}
 
         args:
         - -c
         - |
-          echo "*** input data ***"
-          ls -l /config-input-data/*
-          echo "*** input dats ***"
-          ls -l /config-input-dats/*
-          cp -L /config-input-data/* /config-data/
+          echo "*** Move files from configmap to emptyDir"
           cp -L /config-input-dats/* /config-dats/
-          echo "*** output data ***"
-          ls -l /config-data/*
-          echo "*** output dats ***"
-          ls -l /config-dats/*
-          chown -R 1000:1000 /config-data
+          echo "*** set righ user to the different folders"
           chown -R 1000:1000 /config-dats
           chown -R 1000:1000 /var/lib/cassandra
           chown -R 1000:1000 /status
         volumeMounts:
           - mountPath: /var/lib/cassandra
             name: aaf-cass-vol
-          - mountPath: /config-input-data
-            name: config-cass-init-data
           - mountPath: /config-input-dats
             name: config-cass-init-dats
           - mountPath: /config-dats
             name: config-cass-dats
-          - mountPath: /config-data
-            name: config-cass-data
           - mountPath: /status
             name: aaf-status
         resources:
         - mountPath: /etc/localtime
           name: localtime
           readOnly: true
-        - mountPath: /opt/app/aaf/cass_init/data
-          name: config-cass-data
         - mountPath: /opt/app/aaf/cass_init/dats
           name: config-cass-dats
         - mountPath: /opt/app/aaf/status
       - name: config-cass-init-dats
         configMap:
           name: {{ include "common.fullname" . }}-cass-init-dats
-      - name: config-cass-init-data
-        configMap:
-          name: {{ include "common.fullname" . }}-cass-init-data
       - name: config-cass-dats
         emptyDir: {}
-      - name: config-cass-data
-        emptyDir: {}
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
 
         - mountPath: /opt/app/osaaf/etc/org.osaaf.aaf.log4j.props
           name: aaf-log
           subPath: org.osaaf.aaf.log4j.props
+        - mountPath: /opt/app/osaaf/data/
+          name: config-identity
         {{- if eq .Values.liveness.enabled true }}
         livenessProbe:
           tcpSocket:
       - name: aaf-log
         configMap:
           name: {{ include "common.release" . }}-aaf-log
+      - name: config-init-identity
+        configMap:
+          name: {{ include "common.release" . }}-aaf-identity
+      - name: config-identity
+        emptyDir: {}
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
 {{- end -}}
 
 */}
 
 {{- 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: {{ include "repositoryGenerator.image.busybox" . }}
   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
 
     release: {{ include "common.release" . }}
     heritage: {{ .Release.Service }}
 data:
-{{ tpl (.Files.Glob "resources/log/*").AsConfig . | indent 2 }}
\ No newline at end of file
+{{ tpl (.Files.Glob "resources/log/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-identity
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ include "common.release" . }}
+    heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "resources/data/*").AsConfig . | indent 2 }}
\ No newline at end of file