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