Mandeep Khinda | b1f9efe | 2018-03-28 19:01:55 +0000 | [diff] [blame] | 1 | # Copyright © 2017 Amdocs, AT&T, Bell Canada |
toshrajbhardwaj | f4fc1c6 | 2018-08-06 07:35:14 +0000 | [diff] [blame] | 2 | # Modifications Copyright © 2018 ZTE |
Mandeep Khinda | b1f9efe | 2018-03-28 19:01:55 +0000 | [diff] [blame] | 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 16 | apiVersion: batch/v1 |
| 17 | kind: Job |
| 18 | metadata: |
| 19 | name: {{ include "common.fullname" . }}-config-cassandra |
| 20 | namespace: {{ include "common.namespace" . }} |
| 21 | labels: |
| 22 | app: {{ include "common.name" . }}-job |
| 23 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 24 | release: {{ include "common.release" . }} |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 25 | heritage: {{ .Release.Service }} |
| 26 | spec: |
Mike Elliott | 6482f50 | 2018-04-30 15:02:43 -0400 | [diff] [blame] | 27 | backoffLimit: 20 |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 28 | template: |
| 29 | metadata: |
| 30 | labels: |
| 31 | app: {{ include "common.name" . }}-job |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 32 | release: {{ include "common.release" . }} |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 33 | spec: |
| 34 | restartPolicy: Never |
| 35 | initContainers: |
| 36 | - name: {{ include "common.name" . }}-init-readiness |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 37 | image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}" |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 38 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 39 | command: |
Sylvain Desbureaux | 1694e1d | 2020-08-21 09:58:25 +0200 | [diff] [blame] | 40 | - /app/ready.py |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 41 | args: |
| 42 | - --container-name |
Mahendra Raghuwanshi | 35f83f5 | 2019-03-20 10:42:49 +0000 | [diff] [blame] | 43 | {{- if .Values.global.cassandra.localCluster }} |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 44 | - sdc-cs |
Mahendra Raghuwanshi | 35f83f5 | 2019-03-20 10:42:49 +0000 | [diff] [blame] | 45 | {{- else }} |
| 46 | - cassandra |
| 47 | {{- end }} |
ChrisC | 3217234 | 2020-10-02 16:39:13 +0200 | [diff] [blame] | 48 | - "-t" |
| 49 | - "15" |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 50 | env: |
| 51 | - name: NAMESPACE |
| 52 | valueFrom: |
| 53 | fieldRef: |
| 54 | apiVersion: v1 |
| 55 | fieldPath: metadata.namespace |
ChrisC | 3217234 | 2020-10-02 16:39:13 +0200 | [diff] [blame] | 56 | resources: |
| 57 | limits: |
| 58 | cpu: 100m |
| 59 | memory: 100Mi |
| 60 | requests: |
| 61 | cpu: 3m |
| 62 | memory: 20Mi |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 63 | containers: |
| 64 | - name: {{ include "common.name" . }}-job |
Mandeep Khinda | 51a8b1b | 2018-04-24 20:05:32 +0000 | [diff] [blame] | 65 | image: "{{ include "common.repository" . }}/{{ .Values.cassandraInitImage }}" |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 66 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 67 | volumeMounts: |
| 68 | - name: {{ include "common.fullname" . }}-environments |
MichaelMorris | b137f7e | 2020-03-15 17:44:48 +0000 | [diff] [blame] | 69 | mountPath: /home/sdc/chef-solo/environments/ |
Mandeep Khinda | 403c1c1 | 2018-04-19 23:15:43 +0000 | [diff] [blame] | 70 | - name: {{ include "common.fullname" . }}-chef-cache |
MichaelMorris | b137f7e | 2020-03-15 17:44:48 +0000 | [diff] [blame] | 71 | mountPath: /home/sdc/chef-solo/cache |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 72 | env: |
| 73 | - name: ENVNAME |
ChrisC | 742a7b2 | 2020-09-04 11:29:57 +0200 | [diff] [blame] | 74 | value: {{ .Values.env.name }} |
Mandeep Khinda | 403c1c1 | 2018-04-19 23:15:43 +0000 | [diff] [blame] | 75 | - name: RELEASE |
| 76 | value: {{ .Values.config.release }} |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 77 | - name: SDC_USER |
| 78 | valueFrom: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 79 | secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: sdc_user} |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 80 | - name: SDC_PASSWORD |
| 81 | valueFrom: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 82 | secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: sdc_password} |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 83 | - name: CS_PASSWORD |
| 84 | valueFrom: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 85 | secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: cs_password} |
Mandeep Khinda | 403c1c1 | 2018-04-19 23:15:43 +0000 | [diff] [blame] | 86 | - name: HOST_IP |
| 87 | valueFrom: |
| 88 | fieldRef: |
| 89 | fieldPath: status.podIP |
ChrisC | 3217234 | 2020-10-02 16:39:13 +0200 | [diff] [blame] | 90 | resources: |
| 91 | limits: |
| 92 | cpu: 800m |
| 93 | memory: 1024Mi |
| 94 | requests: |
| 95 | cpu: 200m |
| 96 | memory: 300Mi |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 97 | volumes: |
Mandeep Khinda | 403c1c1 | 2018-04-19 23:15:43 +0000 | [diff] [blame] | 98 | - name: {{ include "common.fullname" . }}-environments |
| 99 | configMap: |
Krzysztof Opasiak | 137d7cc | 2020-01-24 23:49:11 +0100 | [diff] [blame] | 100 | name: {{ include "common.release" . }}-sdc-environments-configmap |
Mandeep Khinda | 403c1c1 | 2018-04-19 23:15:43 +0000 | [diff] [blame] | 101 | defaultMode: 0755 |
Mandeep Khinda | 403c1c1 | 2018-04-19 23:15:43 +0000 | [diff] [blame] | 102 | - name: {{ include "common.fullname" . }}-chef-cache |
| 103 | emptyDir: {} |
Mandeep Khinda | a1047f4 | 2018-03-22 02:12:15 +0000 | [diff] [blame] | 104 | imagePullSecrets: |
| 105 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |
| 106 | restartPolicy: Never |