X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fsdnc%2Ftemplates%2Fjob.yaml;h=451c5b045380aeb442d38d10ac85257354ee630c;hb=4753743f0743a6b22f69e718c3cdb4ba8843cea6;hp=897a0bac7e6e5053377771c81ae3c8b0ce1f1626;hpb=cbc703c708b0c4805e4280e04d88dd3dea5b6e95;p=oom.git diff --git a/kubernetes/sdnc/templates/job.yaml b/kubernetes/sdnc/templates/job.yaml index 897a0bac7e..451c5b0453 100755 --- a/kubernetes/sdnc/templates/job.yaml +++ b/kubernetes/sdnc/templates/job.yaml @@ -25,10 +25,6 @@ metadata: chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} release: {{ include "common.release" . }} heritage: {{ .Release.Service }} - annotations: - "helm.sh/hook": post-install - "helm.sh/hook-weight": "0" - "helm.sh/hook-delete-policy": before-hook-creation spec: backoffLimit: 20 template: @@ -84,8 +80,8 @@ spec: command: - /app/ready.py args: - - --container-name - - {{ include "common.mariadbService" . }} + - --app-name + - {{ include "common.mariadbAppName" . }} env: - name: NAMESPACE valueFrom: @@ -94,6 +90,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.repository" . }}/{{ .Values.image }} @@ -135,17 +138,35 @@ spec: command: - /bin/bash args: - - {{.Values.config.binDir }}/installSdncDb.sh - resources: -{{ include "common.resources" . | indent 12 }} + - -c + - | + sleep 60; {{.Values.config.binDir }}/installSdncDb.sh + resources: {{ include "common.resources" . | nindent 10 }} + {{- if include "common.onServiceMesh" . }} + - name: sdnc-service-mesh-wait-for-job-container + image: {{ include "repositoryGenerator.image.quitQuit" . }} + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: + - /bin/sh + - "-c" + args: + - | + echo "waiting 20s for istio side cars to be up"; sleep 20s; + /app/ready.py --service-mesh-check sdnc -t 45; + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + {{- end }} {{- if .Values.nodeSelector }} - nodeSelector: -{{ toYaml .Values.nodeSelector | indent 10 }} - {{- end -}} + nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }} + {{- end }} {{- if .Values.affinity }} - affinity: -{{ toYaml .Values.affinity | indent 10 }} + affinity: {{ toYaml .Values.affinity | nindent 8 }} {{- end }} + serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} volumes: - name: localtime hostPath: