blob: c9911eb03686370527b9a0e8c6194635219968b8 [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 }}
Huabing Zhao408a87d2018-08-03 06:35:41 +000018 annotations:
19 sidecar.istio.io/inject: "{{.Values.istioSidecar}}"
BorislavG0433c912018-03-21 18:35:30 +020020 spec:
21 initContainers:
22 - command:
23 - /root/ready.py
24 args:
25 - --container-name
26 - msb-discovery
27 env:
28 - name: NAMESPACE
29 valueFrom:
30 fieldRef:
31 apiVersion: v1
32 fieldPath: metadata.namespace
33 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
34 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
35 name: {{ include "common.name" . }}-readiness
36 containers:
37 - name: {{ include "common.name" . }}
BorislavGdf11cd52018-05-06 12:55:20 +000038 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
BorislavG0433c912018-03-21 18:35:30 +020039 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
40 env:
41 - name: KUBE_MASTER_URL
42 value: {{ .Values.config.kubeMasterUrl }}
43 - name: MSB_URL
44 value: {{tpl $.Values.config.discoveryUrl .}}
45 volumeMounts:
46 - mountPath: /etc/localtime
47 name: localtime
48 readOnly: true
49 resources:
50{{ toYaml .Values.resources | indent 12 }}
51 {{- if .Values.nodeSelector }}
52 nodeSelector:
53{{ toYaml .Values.nodeSelector | indent 10 }}
54 {{- end -}}
55 {{- if .Values.affinity }}
56 affinity:
57{{ toYaml .Values.affinity | indent 10 }}
58 {{- end }}
59 volumes:
60 - name: localtime
61 hostPath:
62 path: /etc/localtime
63 imagePullSecrets:
64 - name: "{{ include "common.namespace" . }}-docker-registry-key"