[AAF] Make AAF ServiceMesh compatible 89/128989/2
authorAndreas Geissler <andreas-geissler@telekom.de>
Fri, 29 Apr 2022 07:22:02 +0000 (09:22 +0200)
committerAndreas Geissler <andreas-geissler@telekom.de>
Fri, 29 Apr 2022 08:40:25 +0000 (10:40 +0200)
Allthough AAF is not needed for SM it might be required on
exceptional cases. In this case the sidecar needs to be disabled
for aaf-service and aaf-locate.
Additionally the order of chart creation need to be fixed and
the job of aaf-sms requires a sidecar killing.

Issue-ID: OOM-2820

Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de>
Change-Id: I77a2b3da4c826cf294c791bee0d1159233934253

kubernetes/aaf/components/Makefile
kubernetes/aaf/components/aaf-sms/templates/job.yaml
kubernetes/aaf/components/aaf-sms/values.yaml
kubernetes/aaf/components/aaf-templates/templates/_deployment.tpl

index f4c9784..4a15d02 100644 (file)
@@ -19,7 +19,10 @@ SECRET_DIR := $(OUTPUT_DIR)/secrets
 
 EXCLUDES :=
 HELM_BIN := helm
-HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+PROCESSED_FIRST := aaf-templates
+TO_FILTER := $(PROCESSED_FIRST) $(EXCLUDES)
+
+HELM_CHARTS := $(PROCESSED_FIRST) $(filter-out $(TO_FILTER), $(sort $(patsubst %/.,%,$(wildcard */.))))
 
 .PHONY: $(EXCLUDES) $(HELM_CHARTS)
 
index 8dbe276..2370cf6 100644 (file)
@@ -201,6 +201,7 @@ spec:
         affinity:
 {{ toYaml .Values.affinity | indent 10 }}
         {{- end }}
+      {{ include "common.waitForJobContainer" . | indent 6 | trim }}
       volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
       - name: localtime
         hostPath:
index da268cc..114ad23 100644 (file)
@@ -276,3 +276,8 @@ resources:
       cpu: 25m
       memory: 100Mi
   unlimited: {}
+
+wait_for_job_container:
+  containers:
+    - '{{ include "common.name" . }}-preload'
+
index 50da519..c0614b2 100644 (file)
@@ -23,6 +23,10 @@ spec:
   replicas: {{ .Values.replicaCount }}
   template:
     metadata: {{- include "common.templateMetadata" . | nindent 6 }}
+      {{- if (include "common.onServiceMesh" .) }}
+      annotations:
+        sidecar.istio.io/inject: "false"
+      {{- end }}
     spec: {{ include "aaf.initContainers" . | nindent 6 }}
       containers:
       - name: {{ include "common.name" . }}