X-Git-Url: https://gerrit.onap.org/r/gitweb?p=oom.git;a=blobdiff_plain;f=kubernetes%2Fsdc%2Fcharts%2Fsdc-cs%2Ftemplates%2Fjob.yaml;h=4e4aad46fc6d10f186a8649463404e895d3a12b1;hp=4d341ba8d3f6a90d337621107c17bc1aa03582e6;hb=b137f7e426b7556a05d1222716d1870ce9dad72c;hpb=403c1c1851dd17f0b77386eb8422796cb46a8dae diff --git a/kubernetes/sdc/charts/sdc-cs/templates/job.yaml b/kubernetes/sdc/charts/sdc-cs/templates/job.yaml index 4d341ba8d3..4e4aad46fc 100644 --- a/kubernetes/sdc/charts/sdc-cs/templates/job.yaml +++ b/kubernetes/sdc/charts/sdc-cs/templates/job.yaml @@ -1,4 +1,5 @@ # Copyright © 2017 Amdocs, AT&T, Bell Canada +# Modifications Copyright © 2018 ZTE # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,14 +21,15 @@ metadata: labels: app: {{ include "common.name" . }}-job chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} + release: {{ include "common.release" . }} heritage: {{ .Release.Service }} spec: + backoffLimit: 20 template: metadata: labels: app: {{ include "common.name" . }}-job - release: {{ .Release.Name }} + release: {{ include "common.release" . }} spec: restartPolicy: Never initContainers: @@ -38,7 +40,11 @@ spec: - /root/ready.py args: - --container-name + {{- if .Values.global.cassandra.localCluster }} - sdc-cs + {{- else }} + - cassandra + {{- end }} env: - name: NAMESPACE valueFrom: @@ -47,15 +53,13 @@ spec: fieldPath: metadata.namespace containers: - name: {{ include "common.name" . }}-job - image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.cassandraInitImage }}" + image: "{{ include "common.repository" . }}/{{ .Values.cassandraInitImage }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} volumeMounts: - name: {{ include "common.fullname" . }}-environments - mountPath: /root/chef-solo/environments/ - - name: {{ include "common.fullname" . }}-data - mountPath: /var/lib/cassandra/ + mountPath: /home/sdc/chef-solo/environments/ - name: {{ include "common.fullname" . }}-chef-cache - mountPath: /root/chef-solo/cache + mountPath: /home/sdc/chef-solo/cache env: - name: ENVNAME value: {{ .Values.global.env.name }} @@ -63,13 +67,13 @@ spec: value: {{ .Values.config.release }} - name: SDC_USER valueFrom: - secretKeyRef: {name: {{ include "common.fullname" . }}, key: sdc_user} + secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: sdc_user} - name: SDC_PASSWORD valueFrom: - secretKeyRef: {name: {{ include "common.fullname" . }}, key: sdc_password} + secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: sdc_password} - name: CS_PASSWORD valueFrom: - secretKeyRef: {name: {{ include "common.fullname" . }}, key: cs_password} + secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: cs_password} - name: HOST_IP valueFrom: fieldRef: @@ -77,15 +81,8 @@ spec: volumes: - name: {{ include "common.fullname" . }}-environments configMap: - name: {{ .Release.Name }}-sdc-environments-configmap + name: {{ include "common.release" . }}-sdc-environments-configmap defaultMode: 0755 - - name: {{ include "common.fullname" . }}-data - {{- if .Values.persistence.enabled }} - persistentVolumeClaim: - claimName: {{ include "common.fullname" . }} - {{- else }} - emptyDir: {} - {{- end }} - name: {{ include "common.fullname" . }}-chef-cache emptyDir: {} imagePullSecrets: