yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 1 | #{{ if not .Values.disableDcaeKafka }} |
Mike Elliott | 586f03b | 2017-09-08 12:46:15 -0400 | [diff] [blame] | 2 | apiVersion: extensions/v1beta1 |
| 3 | kind: Deployment |
| 4 | metadata: |
| 5 | name: kafka |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame^] | 6 | namespace: "{{ .Values.nsPrefix }}" |
Mike Elliott | 586f03b | 2017-09-08 12:46:15 -0400 | [diff] [blame] | 7 | spec: |
| 8 | selector: |
| 9 | matchLabels: |
| 10 | app: kafka |
| 11 | template: |
| 12 | metadata: |
| 13 | labels: |
| 14 | app: kafka |
| 15 | name: kafka |
Mike Elliott | 586f03b | 2017-09-08 12:46:15 -0400 | [diff] [blame] | 16 | spec: |
kiranya | dc55bbc | 2017-11-22 14:22:04 +0000 | [diff] [blame] | 17 | initContainers: |
| 18 | - command: |
| 19 | - /root/ready.py |
| 20 | args: |
| 21 | - --container-name |
| 22 | - zookeeper |
| 23 | env: |
| 24 | - name: NAMESPACE |
| 25 | valueFrom: |
| 26 | fieldRef: |
| 27 | apiVersion: v1 |
| 28 | fieldPath: metadata.namespace |
| 29 | image: {{ .Values.image.readiness }} |
| 30 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 31 | name: kafka-readiness |
Mike Elliott | 586f03b | 2017-09-08 12:46:15 -0400 | [diff] [blame] | 32 | containers: |
| 33 | - image: {{ .Values.image.kafka }} |
| 34 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 35 | name: kafka |
| 36 | ports: |
| 37 | - containerPort: 9092 |
| 38 | readinessProbe: |
| 39 | tcpSocket: |
| 40 | port: 9092 |
| 41 | initialDelaySeconds: 5 |
| 42 | periodSeconds: 10 |
| 43 | env: |
| 44 | - name: KAFKA_ZOOKEEPER_CONNECT |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame^] | 45 | value: "zookeeper.{{ .Values.nsPrefix }}" |
Mike Elliott | 586f03b | 2017-09-08 12:46:15 -0400 | [diff] [blame] | 46 | - name: KAFKA_ADVERTISED_HOST_NAME |
| 47 | value: "kafka" |
| 48 | - name: KAFKA_BROKER_ID |
| 49 | value: "1" |
| 50 | - name: KAFKA_ADVERTISED_PORT |
| 51 | value: "9092" |
| 52 | - name: KAFKA_PORT |
| 53 | value: "9092" |
| 54 | volumeMounts: |
| 55 | - mountPath: /var/run/docker.sock |
| 56 | name: docker-socket |
| 57 | - mountPath: /kafka |
| 58 | name: kafka-data |
| 59 | - mountPath: /start-kafka.sh |
| 60 | name: start-kafka |
| 61 | restartPolicy: Always |
| 62 | volumes: |
| 63 | - name: docker-socket |
| 64 | hostPath: |
| 65 | path: /var/run/docker.sock |
| 66 | - name: kafka-data |
| 67 | hostPath: |
| 68 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/dcae/message-router/dcae-startup-vm-message-router/docker_files/data-kafka/ |
| 69 | - name: start-kafka |
| 70 | hostPath: |
| 71 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/dcae/message-router/dcae-startup-vm-message-router/docker_files/start-kafka.sh |
| 72 | imagePullSecrets: |
| 73 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
kiranya | dc55bbc | 2017-11-22 14:22:04 +0000 | [diff] [blame] | 74 | #{{ end }} |