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