blob: 2c6c3379c28eea744648fbc2334f785bacfd21f9 [file] [log] [blame]
Nelson,Thomas(tn1381)(arthurdent3)4807fdf2018-09-19 16:52:36 -04001{{/*
2# Copyright © 2018 AT&T, Amdocs, Bell Canada Intellectual Property. All rights reserved.
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*/}}
16
17apiVersion: batch/v1
18kind: Job
19metadata:
20 name: {{ include "common.fullname" . }}-config
21 namespace: {{ include "common.namespace" . }}
22 labels:
23 app: {{ include "common.name" . }}-job
24 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010025 release: {{ include "common.release" . }}
Nelson,Thomas(tn1381)(arthurdent3)4807fdf2018-09-19 16:52:36 -040026 heritage: {{ .Release.Service }}
27spec:
28 template:
29 metadata:
30 labels:
31 app: {{ include "common.name" . }}-job
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010032 release: {{ include "common.release" . }}
Nelson,Thomas(tn1381)(arthurdent3)4807fdf2018-09-19 16:52:36 -040033 spec:
34 restartPolicy: Never
35 initContainers:
36 - name: {{ include "common.name" . }}-readiness
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020037 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
Nelson,Thomas(tn1381)(arthurdent3)4807fdf2018-09-19 16:52:36 -040038 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
39 command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020040 - /app/ready.py
Nelson,Thomas(tn1381)(arthurdent3)4807fdf2018-09-19 16:52:36 -040041 args:
Nelson, Thomas (tn1381)a6cb6172019-05-30 12:31:19 -040042 - --timeout
43 - "{{ .Values.global.readinessTimeout }}"
Nelson,Thomas(tn1381)(arthurdent3)4807fdf2018-09-19 16:52:36 -040044 - --container-name
45 - music-cassandra
46 env:
47 - name: NAMESPACE
48 valueFrom:
49 fieldRef:
50 apiVersion: v1
51 fieldPath: metadata.namespace
52 containers:
53 - name: {{ include "common.name" . }}-update-job
54 image: "{{ .Values.global.repository }}/{{ .Values.job.cassandra.image }}"
55 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
56 env:
57 - name: CASS_HOSTNAME
58 value: "{{ .Values.job.host }}"
59 - name: USERNAME
60 value: "{{ .Values.cql.adminUser.username }}"
61 - name: PORT
62 value: "{{ .Values.job.port }}"
63 - name: PASSWORD
64 value: "{{ .Values.cql.adminUser.password }}"
65 - name: TIMEOUT
66 value: "{{ .Values.job.timeout }}"
67 - name: DELAY
68 value: "{{ .Values.job.delay }}"
69 volumeMounts:
70 # Admin cql Files that setup Admin Keyspace and Change Admin user.
71 - name: {{ include "common.name" . }}-cql
72 mountPath: /cql/admin.cql
73 subPath: admin.cql
74 - name: {{ include "common.name" . }}-cql
75 mountPath: /cql/admin_pw.cql
76 subPath: admin_pw.cql
77 # This is where Apps or MISC will put any of their own startup cql scripts.
78 - name: {{ include "common.name" . }}-extra-cql
79 mountPath: /cql/extra
80 volumes:
81 - name: {{ include "common.name" . }}-cql
82 configMap:
83 name: {{ include "common.fullname" . }}-cql
84 - name: {{ include "common.name" . }}-extra-cql
85 configMap:
86 name: {{ include "common.fullname" . }}-extra-cql
87 restartPolicy: Never
88 imagePullSecrets:
89 - name: "{{ include "common.namespace" . }}-docker-registry-key"
90