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