blob: de18137235413217687fdc4203de144cc8679d8a [file] [log] [blame]
yurynfcef9942017-10-26 17:10:50 +03001#{{ if not .Values.disableDcaeKafka }}
Mike Elliott586f03b2017-09-08 12:46:15 -04002apiVersion: extensions/v1beta1
3kind: Deployment
4metadata:
5 name: kafka
6 namespace: "{{ .Values.nsPrefix }}-dcae"
7spec:
8 selector:
9 matchLabels:
10 app: kafka
11 template:
12 metadata:
13 labels:
14 app: kafka
15 name: kafka
Mike Elliott586f03b2017-09-08 12:46:15 -040016 spec:
kiranyadc55bbc2017-11-22 14:22:04 +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
Mike Elliott586f03b2017-09-08 12:46:15 -040032 containers:
33 - image: {{ .Values.image.kafka }}
34 imagePullPolicy: {{ .Values.pullPolicy }}
35 name: 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
45 value: "zookeeper.{{ .Values.nsPrefix }}-dcae:2181"
46 - name: KAFKA_ADVERTISED_HOST_NAME
47 value: "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:
55 - mountPath: /var/run/docker.sock
56 name: docker-socket
57 - mountPath: /kafka
58 name: kafka-data
59 - mountPath: /start-kafka.sh
60 name: start-kafka
61 restartPolicy: Always
62 volumes:
63 - name: docker-socket
64 hostPath:
65 path: /var/run/docker.sock
66 - name: kafka-data
67 hostPath:
68 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/dcae/message-router/dcae-startup-vm-message-router/docker_files/data-kafka/
69 - name: start-kafka
70 hostPath:
71 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/dcae/message-router/dcae-startup-vm-message-router/docker_files/start-kafka.sh
72 imagePullSecrets:
73 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
kiranyadc55bbc2017-11-22 14:22:04 +000074#{{ end }}