blob: d2f0bb0e4a2cc93a56b43751505b5c2eda756080 [file] [log] [blame]
Mandeep Khindad6ea9872017-06-24 11:49:37 -04001apiVersion: extensions/v1beta1
2kind: Deployment
3metadata:
4 name: global-kafka
5spec:
6 selector:
7 matchLabels:
8 app: global-kafka
9 template:
10 metadata:
11 labels:
12 app: global-kafka
13 name: global-kafka
14 annotations:
15 pod.beta.kubernetes.io/init-containers: '[
16 {
17 "args": [
18 "--container-name",
19 "zookeeper"
20 ],
21 "command": [
22 "/root/ready.py"
23 ],
24 "env": [
25 {
26 "name": "NAMESPACE",
27 "valueFrom": {
28 "fieldRef": {
29 "apiVersion": "v1",
30 "fieldPath": "metadata.namespace"
31 }
32 }
33 }
34 ],
35 "image": "oomk8s/readiness-check:1.0.0",
36 "imagePullPolicy": "Always",
37 "name": "kafka-readiness"
38 }
39 ]'
40 spec:
41 containers:
42 - image: wurstmeister/kafka:latest
43 imagePullPolicy: IfNotPresent
44 name: global-kafka
45 ports:
46 - containerPort: 9092
47 readinessProbe:
48 tcpSocket:
49 port: 9092
50 initialDelaySeconds: 5
51 periodSeconds: 10
52 env:
53 - name: KAFKA_ZOOKEEPER_CONNECT
54 value: "zookeeper.onap-message-router:2181"
55 - name: KAFKA_ADVERTISED_HOST_NAME
56 value: "global-kafka"
57 - name: KAFKA_BROKER_ID
58 value: "1"
59 - name: KAFKA_ADVERTISED_PORT
60 value: "9092"
61 - name: KAFKA_PORT
62 value: "9092"
63 volumeMounts:
64 - mountPath: /var/run/docker.sock
65 name: docker-socket
66 - mountPath: /kafka
67 name: kafka-data
68 - mountPath: /start-kafka.sh
69 name: start-kafka
70 restartPolicy: Always
71 volumes:
72 - name: docker-socket
73 hostPath:
74 path: /var/run/docker.sock
75 - name: kafka-data
76 hostPath:
77 path: /dockerdata-nfs/onapdemo/message-router/dcae-startup-vm-message-router/docker_files/data-kafka/
78 - name: start-kafka
79 hostPath:
80 path: /dockerdata-nfs/onapdemo/message-router/dcae-startup-vm-message-router/docker_files/start-kafka.sh