[UUI] Update image version 16.0.1 of components of UUI
[oom.git] / kubernetes / uui / components / uui-server / templates / job.yaml
index 73bde03..50cc024 100644 (file)
 #
 apiVersion: batch/v1
 kind: Job
-metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    release: {{ include "common.release" . }}
+  {{- if .Values.jobAnnotations }}
+  annotations:  {{- include "common.tplValue" (dict "value" .Values.jobAnnotations "context" $) | nindent 4 }}
+  {{- end }}
 spec:
   backoffLimit: 20
   template:
@@ -29,8 +37,8 @@ spec:
       - command:
         - /app/ready.py
         args:
-        - --container-name
-        - "{{ .Values.postgres.nameOverride }}"
+        - --service-name
+        - "{{ .Values.postgres.service.name2 }}"
         env:
         - name: NAMESPACE
           valueFrom:
@@ -40,6 +48,13 @@ spec:
         image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy}}
         name: {{ include "common.name" . }}-readiness
+        resources:
+          limits:
+            cpu: "100m"
+            memory: "500Mi"
+          requests:
+            cpu: "3m"
+            memory: "20Mi"
       containers:
       - name: {{ include "common.name" . }}-job
         image: {{ include "repositoryGenerator.image.postgres" . }}
@@ -58,10 +73,10 @@ spec:
         - name: init-data
           mountPath: /aaa/init/postgres.sql
           subPath: postgres.sql
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      {{ include "common.waitForJobContainer" . | indent 6 | trim }}
+      {{- include "common.imagePullSecrets" . | nindent 6 }}
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
       - name: init-data
         configMap:
           name: {{ include "common.fullname" . }}
-