blob: 03a21c063615876da0e787db7704500278164faa [file] [log] [blame]
Mandeep Khindaa1047f42018-03-22 02:12:15 +00001apiVersion: batch/v1
2kind: Job
3metadata:
4 name: {{ include "common.fullname" . }}-config-elasticsearch
5 namespace: {{ include "common.namespace" . }}
6 labels:
7 app: {{ include "common.name" . }}-job
8 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
9 release: {{ .Release.Name }}
10 heritage: {{ .Release.Service }}
11spec:
12 template:
13 metadata:
14 labels:
15 app: {{ include "common.name" . }}-job
16 release: {{ .Release.Name }}
17 spec:
18 restartPolicy: Never
19 initContainers:
20 - name: {{ include "common.name" . }}-init-readiness
21 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
22 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
23 command:
24 - /root/ready.py
25 args:
26 - --container-name
27 - sdc-es
28 env:
29 - name: NAMESPACE
30 valueFrom:
31 fieldRef:
32 apiVersion: v1
33 fieldPath: metadata.namespace
34 containers:
35 - name: {{ include "common.name" . }}-job
36 image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.elasticInitImage }}"
37 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
38 volumeMounts:
39 - name: {{ include "common.fullname" . }}-environments
40 mountPath: /root/chef-solo/environments/
41 env:
42 - name: ENVNAME
43 value: {{ .Values.global.env.name }}
44 volumes:
45 - name: {{ include "common.fullname" . }}-environments
46 configMap:
47 name: {{ .Release.Name }}-sdc-environments-configmap
48 defaultMode: 0755
49 imagePullSecrets:
50 - name: "{{ include "common.namespace" . }}-docker-registry-key"
51 restartPolicy: Never