[AAI] Service Mesh related 05/126005/1
authorothman touijer <othman.touijer@soprasteria.com>
Wed, 1 Dec 2021 15:21:18 +0000 (16:21 +0100)
committerothman touijer <othman.touijer@soprasteria.com>
Wed, 1 Dec 2021 15:21:18 +0000 (16:21 +0100)
Sets conditions on volumes that are not mounted when AAF is disabled.

Issue-ID: OOM-2887
Signed-off-by: othman touijer <othman.touijer@soprasteria.com>
Change-Id: If5613bf22d3dbfe527be77726cb1b14a538a2e04

kubernetes/aai/components/aai-graphadmin/templates/deployment.yaml
kubernetes/aai/components/aai-graphadmin/templates/job-copy-db-backup.yaml
kubernetes/aai/components/aai-graphadmin/templates/job-create-db.yaml
kubernetes/aai/components/aai-graphadmin/templates/job-migration.yaml
kubernetes/aai/components/aai-modelloader/templates/deployment.yaml
kubernetes/aai/components/aai-sparky-be/templates/deployment.yaml
kubernetes/aai/components/aai-traversal/templates/job.yaml

index 6b58eaa..cccc2b1 100644 (file)
@@ -222,12 +222,14 @@ spec:
       - name: config
         configMap:
           name: {{ include "common.fullname" . }}
-      - name: properties-input
-        configMap:
-          name: {{ include "common.fullname" . }}-properties
       - name: properties
+      {{- if .Values.global.aafEnabled }}
         emptyDir:
           medium: Memory
+      - name: properties-input
+      {{- end }}
+        configMap:
+          name: {{ include "common.fullname" . }}-properties
       restartPolicy: {{ .Values.restartPolicy }}
       imagePullSecrets:
       - name: {{ include "common.namespace" . }}-docker-registry-key
index d1e7284..95c3fe2 100644 (file)
@@ -126,7 +126,7 @@ spec:
         - -c
         - |
            bash docker-entrypoint.sh dataSnapshot.sh
-           {{- include "common.serviceMesh.killSidecar" . | indent 11 | trim }}
+           {{ include "common.serviceMesh.killSidecar" . | indent 11 | trim }}
         env:
         - name: LOCAL_USER_ID
           value: {{ .Values.securityContext.user_id | quote }}
@@ -174,12 +174,14 @@ spec:
       - name: config
         configMap:
           name: {{ include "common.fullname" . }}
-      - name: properties-input
-        configMap:
-          name: {{ include "common.fullname" . }}-properties
       - name: properties
+      {{- if .Values.global.aafEnabled }}
         emptyDir:
           medium: Memory
+      - name: properties-input
+      {{- end }}
+        configMap:
+          name: {{ include "common.fullname" . }}-properties
       - name: migration
         configMap:
           name: {{ include "common.fullname" . }}-migration
index 4a7de64..62e27b6 100644 (file)
@@ -126,7 +126,7 @@ spec:
         - -c
         - |
            bash docker-entrypoint.sh createDBSchema.sh
-           {{- include "common.serviceMesh.killSidecar" . | indent 11 | trim }}
+           {{ include "common.serviceMesh.killSidecar" . | indent 11 | trim }}
         env:
         - name: LOCAL_USER_ID
           value: {{ .Values.securityContext.user_id | quote }}
@@ -173,12 +173,14 @@ spec:
       - name: config
         configMap:
           name: {{ include "common.fullname" . }}
-      - name: properties-input
-        configMap:
-          name: {{ include "common.fullname" . }}-properties
       - name: properties
+      {{- if .Values.global.aafEnabled }}
         emptyDir:
           medium: Memory
+      - name: properties-input
+      {{- end }}
+        configMap:
+          name: {{ include "common.fullname" . }}-properties
       restartPolicy: Never
       imagePullSecrets:
       - name: {{ include "common.namespace" . }}-docker-registry-key
index 1256e71..07009b2 100644 (file)
@@ -171,7 +171,7 @@ spec:
         - -c
         - |
            bash docker-entrypoint.sh run_Migrations.sh -e UpdateAaiUriIndexMigration --commit --skipPreMigrationSnapShot --runDisabled RebuildAllEdges ;
-           {{- include "common.serviceMesh.killSidecar" . | indent 11 | trim }}
+           {{ include "common.serviceMesh.killSidecar" . | indent 11 | trim }}
         env:
         - name: LOCAL_USER_ID
           value: {{ .Values.securityContext.user_id | quote }}
@@ -221,12 +221,14 @@ spec:
       - name: {{ include "common.fullname" . }}-snapshots
         persistentVolumeClaim:
           claimName: {{ include "common.fullname" . }}-migration
-      - name: properties-input
-        configMap:
-          name: {{ include "common.fullname" . }}-properties
       - name: properties
+      {{- if .Values.global.aafEnabled }}
         emptyDir:
           medium: Memory
+      - name: properties-input
+      {{- end }}
+        configMap:
+          name: {{ include "common.fullname" . }}-properties
       restartPolicy: Never
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
@@ -322,7 +324,7 @@ spec:
         - -c
         - |
            bash docker-entrypoint.sh dataSnapshot.sh
-           {{- include "common.serviceMesh.killSidecar" . | indent 11 | trim }}
+           {{ include "common.serviceMesh.killSidecar" . | indent 11 | trim }}
         env:
         - name: LOCAL_USER_ID
           value: {{ .Values.securityContext.user_id | quote }}
index 0213d63..c4098b1 100644 (file)
@@ -116,12 +116,14 @@ spec:
       - name: localtime
         hostPath:
           path: /etc/localtime
-      - name: prop-config-input
-        configMap:
-          name: {{ include "common.fullname" . }}-prop
       - name: prop-config
+      {{- if .Values.global.aafEnabled }}
         emptyDir:
           medium: Memory
+      - name: prop-config-input
+      {{- end }}
+        configMap:
+          name: {{ include "common.fullname" . }}-prop
       - name: auth-config
         secret:
           secretName: {{ include "common.fullname" . }}
index 48a6b04..6e5ab8b 100644 (file)
@@ -174,9 +174,11 @@ spec:
         configMap:
           name: {{ include "common.fullname" . }}
       - name: portal-config
+      {{- if .Values.global.aafEnabled }}
         emptyDir:
           medium: Memory
       - name: portal-config-input
+      {{- end }}
         configMap:
           name: {{ include "common.fullname" . }}-portal
       - name: portal-config-props
index f2e6ee6..ddd325d 100644 (file)
@@ -77,7 +77,7 @@ spec:
           {{- else }}
            until nc -w10 -z -v aai.{{.Release.Namespace}} 80; do echo "Retrying to reach aai on port 80"; done;
            bash -x /opt/app/aai-traversal/docker-entrypoint.sh install/updateQueryData.sh ;
-           {{- include "common.serviceMesh.killSidecar" . | indent 11 | trim }}
+           {{ include "common.serviceMesh.killSidecar" . | indent 11 | trim }}
           {{- end }}
         env:
         - name: LOCAL_USER_ID