X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fsdc%2Fcomponents%2Fsdc-cs%2Ftemplates%2Fjob.yaml;h=c715342d5e7ad0d28ed9e138309298fc32c46cfc;hb=refs%2Fheads%2Fmaster;hp=3b7b8b15a280165792eb3d91075806c4ef2ada7e;hpb=dd714d1a2746b16644abb42a3f4d3824cbc1132e;p=oom.git diff --git a/kubernetes/sdc/components/sdc-cs/templates/job.yaml b/kubernetes/sdc/components/sdc-cs/templates/job.yaml index 3b7b8b15a2..c715342d5e 100644 --- a/kubernetes/sdc/components/sdc-cs/templates/job.yaml +++ b/kubernetes/sdc/components/sdc-cs/templates/job.yaml @@ -17,14 +17,7 @@ apiVersion: batch/v1 kind: Job -metadata: - name: {{ include "common.fullname" . }}-config-cassandra - namespace: {{ include "common.namespace" . }} - labels: - app: {{ include "common.name" . }}-job - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ include "common.release" . }} - heritage: {{ .Release.Service }} +metadata: {{- include "common.resourceMetadata" . | nindent 2 }} spec: backoffLimit: 20 template: @@ -36,17 +29,13 @@ spec: restartPolicy: Never initContainers: - name: {{ include "common.name" . }}-init-readiness - image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}" + image: {{ include "repositoryGenerator.image.readiness" . }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: - /app/ready.py args: - - --container-name - {{- if .Values.global.cassandra.localCluster }} - - sdc-cs - {{- else }} - - cassandra - {{- end }} + - --service-name + - {{ .Values.global.sdc_cassandra.serviceName }} - "-t" - "15" env: @@ -57,20 +46,22 @@ 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 "common.repository" . }}/{{ .Values.cassandraInitImage }}" + image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.cassandraInitImage }} imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} volumeMounts: - name: {{ include "common.fullname" . }}-environments mountPath: /home/sdc/chef-solo/environments/ - name: {{ include "common.fullname" . }}-chef-cache mountPath: /home/sdc/chef-solo/cache + - name: {{ include "common.fullname" . }}-cqlshrc + mountPath: /home/sdc/.cassandra env: - name: ENVNAME value: {{ .Values.env.name }} @@ -91,11 +82,13 @@ spec: fieldPath: status.podIP resources: limits: - cpu: 800m - memory: 1024Mi + cpu: "800m" + memory: "1Gi" requests: - cpu: 200m - memory: 300Mi + cpu: "200m" + memory: "300Mi" + {{ include "common.waitForJobContainer" . | indent 6 | trim }} + serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} volumes: - name: {{ include "common.fullname" . }}-environments configMap: @@ -103,6 +96,7 @@ spec: defaultMode: 0755 - name: {{ include "common.fullname" . }}-chef-cache emptyDir: {} - imagePullSecrets: - - name: "{{ include "common.namespace" . }}-docker-registry-key" - restartPolicy: Never + - name: {{ include "common.fullname" . }}-cqlshrc + configMap: + name: {{ include "common.release" . }}-sdc-cqlshrc + {{- include "common.imagePullSecrets" . | nindent 6 }}