Merge "[AUTHENTICATION] Restructured keycloak and Oauth2-proxy"
[oom.git] / kubernetes / aai / components / aai-graphadmin / templates / job-migration.yaml
index 49a4de3..9247403 100644 (file)
@@ -63,13 +63,9 @@ spec:
       - command:
         - /app/ready.py
         args:
-        - --app-name
-        {{- if .Values.global.cassandra.localCluster }}
-        - aai-cassandra
-        {{- else }}
-        - cassandra
-        {{- end }}
-        - --container-name
+        - --service-name
+        - {{ .Values.global.cassandra.serviceName }}
+        - --service-name
         - aai-schema-service
         env:
         - name: NAMESPACE
@@ -185,8 +181,7 @@ spec:
         configMap:
           name: {{ include "common.fullname" . }}-properties
       restartPolicy: Never
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
 ---
 apiVersion: batch/v1
 kind: Job
@@ -216,7 +211,7 @@ spec:
       - command:
         - /bin/bash
         - -c
-        - /app/ready.py --app-name aai-cassandra --timeout 1 || /app/ready.py --app-name cassandra
+        - /app/ready.py --service-name {{ .Values.global.cassandra.serviceName }}
         env:
         - name: NAMESPACE
           valueFrom:
@@ -302,6 +297,5 @@ spec:
         persistentVolumeClaim:
           claimName: {{ include "common.fullname" . }}-migration
       restartPolicy: Never
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
 {{ end }}