blob: 3e2628b750cd287907d0e6b6192d61914f82418b [file] [log] [blame]
yurynfcef9942017-10-26 17:10:50 +03001#{{ if not .Values.disableMessageRouterGlobalKafka }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -04002apiVersion: extensions/v1beta1
3kind: Deployment
4metadata:
5 name: global-kafka
Mandeep Khinda0e8f8892017-08-25 03:31:17 +00006 namespace: "{{ .Values.nsPrefix }}-message-router"
Mandeep Khindad6ea9872017-06-24 11:49:37 -04007spec:
8 selector:
9 matchLabels:
10 app: global-kafka
11 template:
12 metadata:
13 labels:
14 app: global-kafka
15 name: global-kafka
16 annotations:
17 pod.beta.kubernetes.io/init-containers: '[
18 {
19 "args": [
20 "--container-name",
21 "zookeeper"
22 ],
23 "command": [
24 "/root/ready.py"
25 ],
26 "env": [
27 {
28 "name": "NAMESPACE",
29 "valueFrom": {
30 "fieldRef": {
31 "apiVersion": "v1",
32 "fieldPath": "metadata.namespace"
33 }
34 }
35 }
36 ],
kerenj9e77b212017-08-23 08:40:41 +000037 "image": "{{ .Values.image.readiness }}",
38 "imagePullPolicy": "{{ .Values.pullPolicy }}",
Mandeep Khindad6ea9872017-06-24 11:49:37 -040039 "name": "kafka-readiness"
40 }
41 ]'
42 spec:
43 containers:
kerenj9e77b212017-08-23 08:40:41 +000044 - image: {{ .Values.image.kafka }}
45 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040046 name: global-kafka
47 ports:
48 - containerPort: 9092
49 readinessProbe:
50 tcpSocket:
51 port: 9092
52 initialDelaySeconds: 5
53 periodSeconds: 10
54 env:
55 - name: KAFKA_ZOOKEEPER_CONNECT
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000056 value: "zookeeper.{{ .Values.nsPrefix }}-message-router:2181"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040057 - name: KAFKA_ADVERTISED_HOST_NAME
58 value: "global-kafka"
59 - name: KAFKA_BROKER_ID
60 value: "1"
61 - name: KAFKA_ADVERTISED_PORT
62 value: "9092"
63 - name: KAFKA_PORT
64 value: "9092"
65 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030066 - mountPath: /etc/localtime
67 name: localtime
68 readOnly: true
Mandeep Khindad6ea9872017-06-24 11:49:37 -040069 - mountPath: /var/run/docker.sock
70 name: docker-socket
71 - mountPath: /kafka
72 name: kafka-data
73 - mountPath: /start-kafka.sh
74 name: start-kafka
75 restartPolicy: Always
76 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030077 - name: localtime
78 hostPath:
79 path: /etc/localtime
Mandeep Khindad6ea9872017-06-24 11:49:37 -040080 - name: docker-socket
81 hostPath:
82 path: /var/run/docker.sock
83 - name: kafka-data
BorislavG66a9a5c2017-09-06 15:12:46 +030084 persistentVolumeClaim:
85 claimName: message-router-kafka
Mandeep Khindad6ea9872017-06-24 11:49:37 -040086 - name: start-kafka
87 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000088 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/message-router/dcae-startup-vm-message-router/docker_files/start-kafka.sh
Borislav Glozman5197e2e2017-07-24 10:45:28 +030089 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000090 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
yurynfcef9942017-10-26 17:10:50 +030091#{{ end }}