vaibhav_16dec | e04b2fe | 2018-03-22 09:07:12 +0000 | [diff] [blame] | 1 | # 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 | |
yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 15 | #{{ if not .Values.disableDcaeKafka }} |
Mike Elliott | 586f03b | 2017-09-08 12:46:15 -0400 | [diff] [blame] | 16 | apiVersion: extensions/v1beta1 |
| 17 | kind: Deployment |
| 18 | metadata: |
| 19 | name: kafka |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 20 | namespace: "{{ .Values.nsPrefix }}" |
Mike Elliott | 586f03b | 2017-09-08 12:46:15 -0400 | [diff] [blame] | 21 | spec: |
| 22 | selector: |
| 23 | matchLabels: |
| 24 | app: kafka |
| 25 | template: |
| 26 | metadata: |
| 27 | labels: |
| 28 | app: kafka |
| 29 | name: kafka |
Mike Elliott | 586f03b | 2017-09-08 12:46:15 -0400 | [diff] [blame] | 30 | spec: |
kiranya | dc55bbc | 2017-11-22 14:22:04 +0000 | [diff] [blame] | 31 | 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 Elliott | 586f03b | 2017-09-08 12:46:15 -0400 | [diff] [blame] | 46 | 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 |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 59 | value: "zookeeper.{{ .Values.nsPrefix }}" |
Mike Elliott | 586f03b | 2017-09-08 12:46:15 -0400 | [diff] [blame] | 60 | - 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" |
kiranya | dc55bbc | 2017-11-22 14:22:04 +0000 | [diff] [blame] | 88 | #{{ end }} |