blob: 431387158d57367106d5cb88996409ea3d852125 [file] [log] [blame]
BorislavG0433c912018-03-21 18:35:30 +02001apiVersion: extensions/v1beta1
2kind: Deployment
3metadata:
4 name: {{ include "common.fullname" . }}
5 namespace: {{ include "common.namespace" . }}
6 labels:
7 app: {{ include "common.name" . }}
8 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
9 release: {{ .Release.Name }}
10 heritage: {{ .Release.Service }}
11spec:
12 replicas: {{ .Values.replicaCount }}
13 template:
14 metadata:
15 labels:
16 app: {{ include "common.name" . }}
17 release: {{ .Release.Name }}
18 spec:
19 initContainers:
20 - command:
21 - /root/ready.py
22 args:
23 - --container-name
24 - msb-discovery
25 env:
26 - name: NAMESPACE
27 valueFrom:
28 fieldRef:
29 apiVersion: v1
30 fieldPath: metadata.namespace
31 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
32 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
33 name: {{ include "common.name" . }}-readiness
34 containers:
35 - name: {{ include "common.name" . }}
BorislavGdf11cd52018-05-06 12:55:20 +000036 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
BorislavG0433c912018-03-21 18:35:30 +020037 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
38 env:
39 - name: KUBE_MASTER_URL
40 value: {{ .Values.config.kubeMasterUrl }}
41 - name: MSB_URL
42 value: {{tpl $.Values.config.discoveryUrl .}}
43 volumeMounts:
44 - mountPath: /etc/localtime
45 name: localtime
46 readOnly: true
47 resources:
48{{ toYaml .Values.resources | indent 12 }}
49 {{- if .Values.nodeSelector }}
50 nodeSelector:
51{{ toYaml .Values.nodeSelector | indent 10 }}
52 {{- end -}}
53 {{- if .Values.affinity }}
54 affinity:
55{{ toYaml .Values.affinity | indent 10 }}
56 {{- end }}
57 volumes:
58 - name: localtime
59 hostPath:
60 path: /etc/localtime
61 imagePullSecrets:
62 - name: "{{ include "common.namespace" . }}-docker-registry-key"