X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fcommon%2Fmariadb-init%2Ftemplates%2Fjob.yaml;h=288ea8e02e564f577d91405be6b0588830654d11;hb=4753743f0743a6b22f69e718c3cdb4ba8843cea6;hp=96d1dc54a4b0c329a6b63d28e7db70c6df9808f8;hpb=155862c8f3a2f5e6791c7d2cf0ee382491e3d652;p=oom.git diff --git a/kubernetes/common/mariadb-init/templates/job.yaml b/kubernetes/common/mariadb-init/templates/job.yaml index 96d1dc54a4..288ea8e02e 100644 --- a/kubernetes/common/mariadb-init/templates/job.yaml +++ b/kubernetes/common/mariadb-init/templates/job.yaml @@ -41,7 +41,7 @@ spec: command: - /app/ready.py args: - - --container-name + - --app-name - {{ default .Values.global.mariadbGalera.nameOverride .Values.mariadbGalera.containerName }} env: - name: NAMESPACE @@ -51,6 +51,13 @@ spec: fieldPath: metadata.namespace image: {{ include "repositoryGenerator.image.readiness" . }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + resources: + limits: + cpu: "100m" + memory: "0.5Gi" + requests: + cpu: "3m" + memory: "0.02Gi" containers: - name: {{ include "common.name" . }} image: {{ include "repositoryGenerator.image.mariadb" . }} @@ -59,6 +66,8 @@ spec: - /bin/sh - -c - | + {{- if include "common.onServiceMesh" . }} + echo "waiting 15s for istio side cars to be up"; sleep 15s;{{- end }} /db_init/db_init.sh {{ if or .Values.dbScriptConfigMap .Values.dbScript }} && /db_config/db_cmd.sh{{ end }} env: @@ -89,8 +98,8 @@ spec: - name: mariadb-conf mountPath: /db_config/ {{- end }} - resources: -{{ include "common.resources" . | indent 12 }} + resources: {{ include "common.resources" . | nindent 10 }} + {{ include "common.waitForJobContainer" . | indent 6 | trim }} {{- if .Values.nodeSelector }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} @@ -99,6 +108,7 @@ spec: affinity: {{ toYaml .Values.affinity | indent 10 }} {{- end }} + serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} volumes: - name: localtime hostPath: