blob: 9bfca2bd943aeb6d45614b6a769e2c320f4b97c2 [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
16 annotations:
17 pod.beta.kubernetes.io/init-containers: '[
18 {
19 "args": [
20 "--container-name",
21 "zookeeper"
22 ],
23 "command": [
24 "/root/ready.py"
25 ],
26 "env": [
27 {
28 "name": "NAMESPACE",
29 "valueFrom": {
30 "fieldRef": {
31 "apiVersion": "v1",
32 "fieldPath": "metadata.namespace"
33 }
34 }
35 }
36 ],
37 "image": "{{ .Values.image.readiness }}",
38 "imagePullPolicy": "{{ .Values.pullPolicy }}",
39 "name": "kafka-readiness"
40 }
41 ]'
42 spec:
43 containers:
44 - image: {{ .Values.image.kafka }}
45 imagePullPolicy: {{ .Values.pullPolicy }}
46 name: kafka
47 ports:
48 - containerPort: 9092
49 readinessProbe:
50 tcpSocket:
51 port: 9092
52 initialDelaySeconds: 5
53 periodSeconds: 10
54 env:
55 - name: KAFKA_ZOOKEEPER_CONNECT
56 value: "zookeeper.{{ .Values.nsPrefix }}-dcae:2181"
57 - name: KAFKA_ADVERTISED_HOST_NAME
58 value: "kafka"
59 - name: KAFKA_BROKER_ID
60 value: "1"
61 - name: KAFKA_ADVERTISED_PORT
62 value: "9092"
63 - name: KAFKA_PORT
64 value: "9092"
65 volumeMounts:
66 - mountPath: /var/run/docker.sock
67 name: docker-socket
68 - mountPath: /kafka
69 name: kafka-data
70 - mountPath: /start-kafka.sh
71 name: start-kafka
72 restartPolicy: Always
73 volumes:
74 - name: docker-socket
75 hostPath:
76 path: /var/run/docker.sock
77 - name: kafka-data
78 hostPath:
79 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/dcae/message-router/dcae-startup-vm-message-router/docker_files/data-kafka/
80 - name: start-kafka
81 hostPath:
82 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/dcae/message-router/dcae-startup-vm-message-router/docker_files/start-kafka.sh
83 imagePullSecrets:
84 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
yurynfcef9942017-10-26 17:10:50 +030085#{{ end }}