blob: 2b142533c70a3d082f9c195b1f5c4d58889f9342 [file] [log] [blame]
toshrajbhardwajf4fc1c62018-08-06 07:35:14 +00001# Copyright © 2017 Amdocs, AT&T, Bell Canada
2# Modifications Copyright © 2018 ZTE
priyanshua1b061392018-05-29 12:50:14 +05303#
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
16apiVersion: batch/v1
17kind: Job
18metadata:
priyanshu3af9db62018-08-16 16:23:52 +053019 name: {{ include "common.fullname" . }}-workflow-init
priyanshua1b061392018-05-29 12:50:14 +053020 namespace: {{ include "common.namespace" . }}
21 labels:
22 app: {{ include "common.name" . }}-job
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ .Release.Name }}
25 heritage: {{ .Release.Service }}
26spec:
27 backoffLimit: 20
28 template:
29 metadata:
30 labels:
31 app: {{ include "common.name" . }}-job
32 release: {{ .Release.Name }}
33 spec:
34 restartPolicy: Never
35 initContainers:
36 - name: {{ include "common.name" . }}-init-readiness
37 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
38 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
39 command:
priyanshu3af9db62018-08-16 16:23:52 +053040 - /root/job_complete.py
priyanshua1b061392018-05-29 12:50:14 +053041 args:
priyanshu3af9db62018-08-16 16:23:52 +053042 - --job-name
43 - {{ .Release.Name }}-sdc-cs-config-cassandra
priyanshua1b061392018-05-29 12:50:14 +053044 env:
45 - name: NAMESPACE
46 valueFrom:
47 fieldRef:
48 apiVersion: v1
49 fieldPath: metadata.namespace
50 containers:
51 - name: {{ include "common.name" . }}-job
52 image: "{{ include "common.repository" . }}/{{ .Values.configInitImage }}"
53 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
54 env:
55 - name: CS_HOST
priyanshu3af9db62018-08-16 16:23:52 +053056 value: "sdc-cs"
57 - name: CS_PORT
58 value: "{{ .Values.config.cassandraThriftClientPort }}"
59 - name: CS_AUTHENTICATE
60 value: "{{ .Values.config.cassandaAuthenticationEnabled }}"
priyanshua1b061392018-05-29 12:50:14 +053061 - name: CS_USER
62 valueFrom:
63 secretKeyRef: {name: {{ .Release.Name }}-sdc-cs-secrets, key: sdc_user}
64 - name: CS_PASSWORD
65 valueFrom:
66 secretKeyRef: {name: {{ .Release.Name }}-sdc-cs-secrets, key: sdc_password}
67 imagePullSecrets:
68 - name: "{{ include "common.namespace" . }}-docker-registry-key"