[SO] Use readiness check job support
[oom.git] / kubernetes / so / components / so-cnf-adapter / templates / deployment.yaml
index 8c894ad..4518a5f 100755 (executable)
@@ -45,28 +45,15 @@ spec:
               {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-aai-creds" "key" "password") | indent 14 }}
             - name: MSO_KEY
               {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cnf-adapter-mso-key" "key" "password") | indent 14 }}
-          image: {{ .Values.global.dockerHubRepository }}/{{ .Values.global.soCryptoImage }}
+          image: {{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.global.soCryptoImage }}
           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
           volumeMounts:
             - name: encoder
               mountPath: /output
-        - name: {{ include "common.name" . }}-readiness
-          command:
-            - /app/ready.py
-          args:
-            - --job-name
-            - {{ include "common.release" . }}-so-mariadb-config-job
-          env:
-            - name: NAMESPACE
-              valueFrom:
-                fieldRef:
-                  apiVersion: v1
-                  fieldPath: metadata.namespace
-          image: {{ include "common.repository" . }}/{{ .Values.global.readinessImage }}
-          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        {{ include "common.readinessCheck.waitFor" . | indent 8 | trim }}
       containers:
         - name: {{ include "common.name" . }}
-          image: {{ include "common.repository" . }}/{{ .Values.image }}
+          image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
           command:
             - sh
           args:
@@ -105,6 +92,7 @@ spec:
             - name: config
               mountPath: /app/config
               readOnly: true
+              readOnly: true
             - name: encoder
               mountPath: /input
           livenessProbe:
@@ -128,3 +116,4 @@ spec:
             medium: Memory
       imagePullSecrets:
         - name: "{{ include "common.namespace" . }}-docker-registry-key"
+