blob: 1564f9b03a833e5e06afe889e4633b7e90d34055 [file] [log] [blame]
Mandeep Khindad6ea9872017-06-24 11:49:37 -04001apiVersion: extensions/v1beta1
2kind: Deployment
3metadata:
4 name: global-kafka
Mandeep Khinda0e8f8892017-08-25 03:31:17 +00005 namespace: "{{ .Values.nsPrefix }}-message-router"
Mandeep Khindad6ea9872017-06-24 11:49:37 -04006spec:
7 selector:
8 matchLabels:
9 app: global-kafka
10 template:
11 metadata:
12 labels:
13 app: global-kafka
14 name: global-kafka
15 annotations:
16 pod.beta.kubernetes.io/init-containers: '[
17 {
18 "args": [
19 "--container-name",
20 "zookeeper"
21 ],
22 "command": [
23 "/root/ready.py"
24 ],
25 "env": [
26 {
27 "name": "NAMESPACE",
28 "valueFrom": {
29 "fieldRef": {
30 "apiVersion": "v1",
31 "fieldPath": "metadata.namespace"
32 }
33 }
34 }
35 ],
kerenj9e77b212017-08-23 08:40:41 +000036 "image": "{{ .Values.image.readiness }}",
37 "imagePullPolicy": "{{ .Values.pullPolicy }}",
Mandeep Khindad6ea9872017-06-24 11:49:37 -040038 "name": "kafka-readiness"
39 }
40 ]'
41 spec:
42 containers:
kerenj9e77b212017-08-23 08:40:41 +000043 - image: {{ .Values.image.kafka }}
44 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040045 name: global-kafka
46 ports:
47 - containerPort: 9092
48 readinessProbe:
49 tcpSocket:
50 port: 9092
51 initialDelaySeconds: 5
52 periodSeconds: 10
53 env:
54 - name: KAFKA_ZOOKEEPER_CONNECT
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000055 value: "zookeeper.{{ .Values.nsPrefix }}-message-router:2181"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040056 - name: KAFKA_ADVERTISED_HOST_NAME
57 value: "global-kafka"
58 - name: KAFKA_BROKER_ID
59 value: "1"
60 - name: KAFKA_ADVERTISED_PORT
61 value: "9092"
62 - name: KAFKA_PORT
63 value: "9092"
64 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030065 - mountPath: /etc/localtime
66 name: localtime
67 readOnly: true
Mandeep Khindad6ea9872017-06-24 11:49:37 -040068 - mountPath: /var/run/docker.sock
69 name: docker-socket
70 - mountPath: /kafka
71 name: kafka-data
72 - mountPath: /start-kafka.sh
73 name: start-kafka
74 restartPolicy: Always
75 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030076 - name: localtime
77 hostPath:
78 path: /etc/localtime
Mandeep Khindad6ea9872017-06-24 11:49:37 -040079 - name: docker-socket
80 hostPath:
81 path: /var/run/docker.sock
82 - name: kafka-data
BorislavG66a9a5c2017-09-06 15:12:46 +030083 persistentVolumeClaim:
84 claimName: message-router-kafka
Mandeep Khindad6ea9872017-06-24 11:49:37 -040085 - name: start-kafka
86 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000087 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/message-router/dcae-startup-vm-message-router/docker_files/start-kafka.sh
Borislav Glozman5197e2e2017-07-24 10:45:28 +030088 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000089 - name: "{{ .Values.nsPrefix }}-docker-registry-key"