blob: 52d0503983b36bbb61bcff7d6ac5ef932b57185d [file] [log] [blame]
vaibhav_16dece04b2fe2018-03-22 09:07:12 +00001# Copyright © 2017 Amdocs, Bell Canada
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
yurynfcef9942017-10-26 17:10:50 +030015#{{ if not .Values.disableDcaeKafka }}
Mike Elliott586f03b2017-09-08 12:46:15 -040016apiVersion: extensions/v1beta1
17kind: Deployment
18metadata:
19 name: kafka
BorislavG8bfc6cf2018-02-27 15:04:26 +000020 namespace: "{{ .Values.nsPrefix }}"
Mike Elliott586f03b2017-09-08 12:46:15 -040021spec:
22 selector:
23 matchLabels:
24 app: kafka
25 template:
26 metadata:
27 labels:
28 app: kafka
29 name: kafka
Mike Elliott586f03b2017-09-08 12:46:15 -040030 spec:
kiranyadc55bbc2017-11-22 14:22:04 +000031 initContainers:
32 - command:
33 - /root/ready.py
34 args:
35 - --container-name
36 - zookeeper
37 env:
38 - name: NAMESPACE
39 valueFrom:
40 fieldRef:
41 apiVersion: v1
42 fieldPath: metadata.namespace
43 image: {{ .Values.image.readiness }}
44 imagePullPolicy: {{ .Values.pullPolicy }}
45 name: kafka-readiness
Mike Elliott586f03b2017-09-08 12:46:15 -040046 containers:
47 - image: {{ .Values.image.kafka }}
48 imagePullPolicy: {{ .Values.pullPolicy }}
49 name: kafka
50 ports:
51 - containerPort: 9092
52 readinessProbe:
53 tcpSocket:
54 port: 9092
55 initialDelaySeconds: 5
56 periodSeconds: 10
57 env:
58 - name: KAFKA_ZOOKEEPER_CONNECT
BorislavG8bfc6cf2018-02-27 15:04:26 +000059 value: "zookeeper.{{ .Values.nsPrefix }}"
Mike Elliott586f03b2017-09-08 12:46:15 -040060 - name: KAFKA_ADVERTISED_HOST_NAME
61 value: "kafka"
62 - name: KAFKA_BROKER_ID
63 value: "1"
64 - name: KAFKA_ADVERTISED_PORT
65 value: "9092"
66 - name: KAFKA_PORT
67 value: "9092"
68 volumeMounts:
69 - mountPath: /var/run/docker.sock
70 name: docker-socket
71 - mountPath: /kafka
72 name: kafka-data
73 - mountPath: /start-kafka.sh
74 name: start-kafka
75 restartPolicy: Always
76 volumes:
77 - name: docker-socket
78 hostPath:
79 path: /var/run/docker.sock
80 - name: kafka-data
81 hostPath:
82 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/dcae/message-router/dcae-startup-vm-message-router/docker_files/data-kafka/
83 - name: start-kafka
84 hostPath:
85 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/dcae/message-router/dcae-startup-vm-message-router/docker_files/start-kafka.sh
86 imagePullSecrets:
87 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
kiranyadc55bbc2017-11-22 14:22:04 +000088#{{ end }}