yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 1 | #{{ if not .Values.disableMessageRouterGlobalKafka }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 2 | apiVersion: extensions/v1beta1 |
| 3 | kind: Deployment |
| 4 | metadata: |
| 5 | name: global-kafka |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 6 | namespace: "{{ .Values.nsPrefix }}-message-router" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 7 | spec: |
| 8 | selector: |
| 9 | matchLabels: |
| 10 | app: global-kafka |
| 11 | template: |
| 12 | metadata: |
| 13 | labels: |
| 14 | app: global-kafka |
| 15 | name: global-kafka |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 16 | spec: |
kiranya | 3561e01 | 2017-11-22 13:45:35 +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 |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 32 | containers: |
kerenj | 9e77b21 | 2017-08-23 08:40:41 +0000 | [diff] [blame] | 33 | - image: {{ .Values.image.kafka }} |
| 34 | imagePullPolicy: {{ .Values.pullPolicy }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 35 | name: global-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 |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 45 | value: "zookeeper.{{ .Values.nsPrefix }}-message-router:2181" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 46 | - name: KAFKA_ADVERTISED_HOST_NAME |
| 47 | value: "global-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: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 55 | - mountPath: /etc/localtime |
| 56 | name: localtime |
| 57 | readOnly: true |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 58 | - mountPath: /var/run/docker.sock |
| 59 | name: docker-socket |
| 60 | - mountPath: /kafka |
| 61 | name: kafka-data |
| 62 | - mountPath: /start-kafka.sh |
| 63 | name: start-kafka |
| 64 | restartPolicy: Always |
| 65 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 66 | - name: localtime |
| 67 | hostPath: |
| 68 | path: /etc/localtime |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 69 | - name: docker-socket |
| 70 | hostPath: |
| 71 | path: /var/run/docker.sock |
| 72 | - name: kafka-data |
BorislavG | 66a9a5c | 2017-09-06 15:12:46 +0300 | [diff] [blame] | 73 | persistentVolumeClaim: |
| 74 | claimName: message-router-kafka |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 75 | - name: start-kafka |
| 76 | hostPath: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 77 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/message-router/dcae-startup-vm-message-router/docker_files/start-kafka.sh |
Borislav Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 78 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 79 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
kiranya | 3561e01 | 2017-11-22 13:45:35 +0000 | [diff] [blame^] | 80 | #{{ end }} |