blob: ab12c28cecc0824a60f5dba65ec053cd92552eea [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
Mandeep Khindad6ea9872017-06-24 11:49:37 -040016 spec:
kiranya3561e012017-11-22 13:45:35 +000017 initContainers:
18 - command:
19 - /root/ready.py
20 args:
21 - --container-name
22 - zookeeper
23 env:
24 - name: NAMESPACE
25 valueFrom:
26 fieldRef:
27 apiVersion: v1
28 fieldPath: metadata.namespace
29 image: {{ .Values.image.readiness }}
30 imagePullPolicy: {{ .Values.pullPolicy }}
31 name: kafka-readiness
Mandeep Khindad6ea9872017-06-24 11:49:37 -040032 containers:
kerenj9e77b212017-08-23 08:40:41 +000033 - image: {{ .Values.image.kafka }}
34 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040035 name: global-kafka
36 ports:
37 - containerPort: 9092
38 readinessProbe:
39 tcpSocket:
40 port: 9092
41 initialDelaySeconds: 5
42 periodSeconds: 10
43 env:
44 - name: KAFKA_ZOOKEEPER_CONNECT
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000045 value: "zookeeper.{{ .Values.nsPrefix }}-message-router:2181"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040046 - name: KAFKA_ADVERTISED_HOST_NAME
47 value: "global-kafka"
48 - name: KAFKA_BROKER_ID
49 value: "1"
50 - name: KAFKA_ADVERTISED_PORT
51 value: "9092"
52 - name: KAFKA_PORT
53 value: "9092"
54 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030055 - mountPath: /etc/localtime
56 name: localtime
57 readOnly: true
Mandeep Khindad6ea9872017-06-24 11:49:37 -040058 - mountPath: /var/run/docker.sock
59 name: docker-socket
60 - mountPath: /kafka
61 name: kafka-data
62 - mountPath: /start-kafka.sh
63 name: start-kafka
64 restartPolicy: Always
65 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030066 - name: localtime
67 hostPath:
68 path: /etc/localtime
Mandeep Khindad6ea9872017-06-24 11:49:37 -040069 - name: docker-socket
70 hostPath:
71 path: /var/run/docker.sock
72 - name: kafka-data
BorislavG66a9a5c2017-09-06 15:12:46 +030073 persistentVolumeClaim:
74 claimName: message-router-kafka
Mandeep Khindad6ea9872017-06-24 11:49:37 -040075 - name: start-kafka
76 hostPath:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000077 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/message-router/dcae-startup-vm-message-router/docker_files/start-kafka.sh
Borislav Glozman5197e2e2017-07-24 10:45:28 +030078 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000079 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
kiranya3561e012017-11-22 13:45:35 +000080#{{ end }}