X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fsdc%2Fcomponents%2Fsdc-cs%2Ftemplates%2Fjob.yaml;h=80820544d84566691a5bd5177807bb86cd0c06e1;hb=891eeb77f57dcb28db018fab84ece4b46758a162;hp=fb849b9f2545eea549024ef734d758144d7b63c9;hpb=64c2d941090b9a0ce5fe50410da2215df56ffa27;p=oom.git diff --git a/kubernetes/sdc/components/sdc-cs/templates/job.yaml b/kubernetes/sdc/components/sdc-cs/templates/job.yaml index fb849b9f25..80820544d8 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: @@ -41,11 +34,11 @@ spec: command: - /app/ready.py args: - - --container-name - {{- if .Values.global.cassandra.localCluster }} - - sdc-cs + - --app-name + {{- if .Values.global.sdc_cassandra.localCluster }} + - {{ ternary "sdc-cs-reaper" "sdc-cs" .Values.global.sdc_cassandra.useOperator }} {{- else }} - - cassandra + - {{ ternary "cassandra-reaper" "cassandra" .Values.global.sdc_cassandra.useOperator }} {{- end }} - "-t" - "15" @@ -71,6 +64,8 @@ spec: 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 }} @@ -96,6 +91,7 @@ spec: requests: cpu: 200m memory: 300Mi + {{ include "common.waitForJobContainer" . | indent 6 | trim }} serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} volumes: - name: {{ include "common.fullname" . }}-environments @@ -104,6 +100,8 @@ spec: defaultMode: 0755 - name: {{ include "common.fullname" . }}-chef-cache emptyDir: {} + - name: {{ include "common.fullname" . }}-cqlshrc + configMap: + name: {{ include "common.release" . }}-sdc-cqlshrc imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" - restartPolicy: Never