blob: 19583bf18a2c61fcd20440bd6e9cf36b523fb2ec [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:
65 - mountPath: /var/run/docker.sock
66 name: docker-socket
67 - mountPath: /kafka
68 name: kafka-data
69 - mountPath: /start-kafka.sh
70 name: start-kafka
71 restartPolicy: Always
72 volumes:
73 - name: docker-socket
74 hostPath:
75 path: /var/run/docker.sock
76 - name: kafka-data
77 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000078 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/message-router/dcae-startup-vm-message-router/docker_files/data-kafka/
Mandeep Khindad6ea9872017-06-24 11:49:37 -040079 - name: start-kafka
80 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000081 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/message-router/dcae-startup-vm-message-router/docker_files/start-kafka.sh
Borislav Glozman5197e2e2017-07-24 10:45:28 +030082 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000083 - name: "{{ .Values.nsPrefix }}-docker-registry-key"