[COMMON] Harmonize resource settings, Part 2
[oom.git] / kubernetes / sdc / components / sdc-be / templates / job.yaml
index aaf8fad..4a0f830 100644 (file)
 
 apiVersion: batch/v1
 kind: Job
-metadata:
-  name: {{ include "common.fullname" . }}-config-backend
-  namespace: {{ include "common.namespace" . }}
-  labels: {{- include "common.labels" . | nindent 4 }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
 spec:
   backoffLimit: 20
   template:
@@ -51,11 +48,11 @@ spec:
               fieldPath: metadata.namespace
         resources:
           limits:
-            cpu: 100m
-            memory: 100Mi
+            cpu: "100m"
+            memory: "500Mi"
           requests:
-            cpu: 3m
-            memory: 20Mi
+            cpu: "3m"
+            memory: "20Mi"
       containers:
       - name: {{ include "common.name" . }}-job
         image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.backendInitImage }}
@@ -74,11 +71,13 @@ spec:
               fieldPath: status.podIP
         resources:
           limits:
-            cpu: 800m
-            memory: 1024Mi
+            cpu: "800m"
+            memory: "1Gi"
           requests:
-            cpu: 200m
-            memory: 200Mi
+            cpu: "200m"
+            memory: "200Mi"
+      {{ include "common.waitForJobContainer" . | indent 6 | trim }}
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
         - name: {{ include "common.fullname" . }}-environments
           configMap:
@@ -88,4 +87,3 @@ spec:
           emptyDir: {}
       imagePullSecrets:
       - name: "{{ include "common.namespace" . }}-docker-registry-key"
-      restartPolicy: Never