blob: 280e6c39d0c6dc36f0ad1088482408783563834e [file] [log] [blame]
yurynfcef9942017-10-26 17:10:50 +03001#{{ if not .Values.disableMsbMsbDiscovery }}
HuabingZhaoc2b4fcf2017-08-29 10:48:25 +08002apiVersion: extensions/v1beta1
3kind: Deployment
4metadata:
5 name: msb-discovery
BorislavG8bfc6cf2018-02-27 15:04:26 +00006 namespace: "{{ .Values.nsPrefix }}"
HuabingZhaoc2b4fcf2017-08-29 10:48:25 +08007spec:
HuabingZhao77d44cd2017-08-30 09:30:03 +08008 replicas: {{ .Values.discoveryReplicas }}
HuabingZhaoc2b4fcf2017-08-29 10:48:25 +08009 selector:
10 matchLabels:
11 app: msb-discovery
12 template:
13 metadata:
14 labels:
15 app: msb-discovery
16 name: msb-discovery
17 spec:
18 hostname: msb-discovery
Huabing Zhao097f6812018-02-09 08:21:38 +000019 initContainers:
20 - command:
21 - /root/ready.py
22 args:
23 - --container-name
24 - msb-consul
25 env:
26 - name: NAMESPACE
27 valueFrom:
28 fieldRef:
29 apiVersion: v1
30 fieldPath: metadata.namespace
31 image: {{ .Values.image.readiness }}
32 imagePullPolicy: {{ .Values.pullPolicy }}
33 name: msb-discovery-readiness
HuabingZhaoc2b4fcf2017-08-29 10:48:25 +080034 containers:
35 - args:
HuabingZhao14391b42017-09-02 14:38:07 +080036 image: {{ .Values.image.discovery }}
HuabingZhaoc2b4fcf2017-08-29 10:48:25 +080037 name: "msb-discovery"
38 env:
39 - name: CONSUL_IP
BorislavG8bfc6cf2018-02-27 15:04:26 +000040 value: msb-consul.{{ .Values.nsPrefix }}
HuabingZhaoc2b4fcf2017-08-29 10:48:25 +080041 ports:
HuabingZhao4ea06552017-08-29 15:30:10 +080042 - containerPort: {{ .Values.discoveryPort }}
HuabingZhaoc2b4fcf2017-08-29 10:48:25 +080043 name: msb-discovery
44 readinessProbe:
45 tcpSocket:
HuabingZhao4ea06552017-08-29 15:30:10 +080046 port: {{ .Values.discoveryPort }}
HuabingZhaoc2b4fcf2017-08-29 10:48:25 +080047 initialDelaySeconds: 5
48 periodSeconds: 10
HuabingZhao14391b42017-09-02 14:38:07 +080049 imagePullPolicy: {{ .Values.pullPolicy }}
HuabingZhaoba8f3492017-09-09 10:17:20 +080050 imagePullSecrets:
51 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
Huabing Zhao097f6812018-02-09 08:21:38 +000052#{{ end }}