blob: 94e01b31c090d3bf0574fe42505b8a6f43dab9bc [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:
vaibhav_16deca6719fe2018-02-14 09:48:43 +00008 replicas: {{ .Values.kafkaReplicas }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -04009 selector:
10 matchLabels:
11 app: global-kafka
12 template:
13 metadata:
14 labels:
15 app: global-kafka
16 name: global-kafka
Mandeep Khindad6ea9872017-06-24 11:49:37 -040017 spec:
kiranya3561e012017-11-22 13:45:35 +000018 initContainers:
19 - command:
20 - /root/ready.py
21 args:
22 - --container-name
23 - zookeeper
24 env:
25 - name: NAMESPACE
26 valueFrom:
27 fieldRef:
28 apiVersion: v1
29 fieldPath: metadata.namespace
30 image: {{ .Values.image.readiness }}
31 imagePullPolicy: {{ .Values.pullPolicy }}
32 name: kafka-readiness
Mandeep Khindad6ea9872017-06-24 11:49:37 -040033 containers:
kerenj9e77b212017-08-23 08:40:41 +000034 - image: {{ .Values.image.kafka }}
35 imagePullPolicy: {{ .Values.pullPolicy }}
Mandeep Khindad6ea9872017-06-24 11:49:37 -040036 name: global-kafka
37 ports:
38 - containerPort: 9092
39 readinessProbe:
40 tcpSocket:
41 port: 9092
42 initialDelaySeconds: 5
43 periodSeconds: 10
44 env:
45 - name: KAFKA_ZOOKEEPER_CONNECT
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000046 value: "zookeeper.{{ .Values.nsPrefix }}-message-router:2181"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040047 - name: KAFKA_ADVERTISED_HOST_NAME
48 value: "global-kafka"
49 - name: KAFKA_BROKER_ID
50 value: "1"
51 - name: KAFKA_ADVERTISED_PORT
52 value: "9092"
53 - name: KAFKA_PORT
54 value: "9092"
55 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +030056 - mountPath: /etc/localtime
57 name: localtime
58 readOnly: true
Mandeep Khindad6ea9872017-06-24 11:49:37 -040059 - mountPath: /var/run/docker.sock
60 name: docker-socket
61 - mountPath: /kafka
62 name: kafka-data
Mandeep Khindad6ea9872017-06-24 11:49:37 -040063 restartPolicy: Always
64 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +030065 - name: localtime
66 hostPath:
67 path: /etc/localtime
Mandeep Khindad6ea9872017-06-24 11:49:37 -040068 - name: docker-socket
69 hostPath:
70 path: /var/run/docker.sock
71 - name: kafka-data
BorislavG66a9a5c2017-09-06 15:12:46 +030072 persistentVolumeClaim:
73 claimName: message-router-kafka
Borislav Glozman5197e2e2017-07-24 10:45:28 +030074 imagePullSecrets:
Mandeep Khinda0e8f8892017-08-25 03:31:17 +000075 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
kiranya3561e012017-11-22 13:45:35 +000076#{{ end }}