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 |
| 16 | annotations: |
| 17 | pod.beta.kubernetes.io/init-containers: '[ |
| 18 | { |
| 19 | "args": [ |
| 20 | "--container-name", |
| 21 | "zookeeper" |
| 22 | ], |
| 23 | "command": [ |
| 24 | "/root/ready.py" |
| 25 | ], |
| 26 | "env": [ |
| 27 | { |
| 28 | "name": "NAMESPACE", |
| 29 | "valueFrom": { |
| 30 | "fieldRef": { |
| 31 | "apiVersion": "v1", |
| 32 | "fieldPath": "metadata.namespace" |
| 33 | } |
| 34 | } |
| 35 | } |
| 36 | ], |
kerenj | 9e77b21 | 2017-08-23 08:40:41 +0000 | [diff] [blame] | 37 | "image": "{{ .Values.image.readiness }}", |
| 38 | "imagePullPolicy": "{{ .Values.pullPolicy }}", |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 39 | "name": "kafka-readiness" |
| 40 | } |
| 41 | ]' |
| 42 | spec: |
| 43 | containers: |
kerenj | 9e77b21 | 2017-08-23 08:40:41 +0000 | [diff] [blame] | 44 | - image: {{ .Values.image.kafka }} |
| 45 | imagePullPolicy: {{ .Values.pullPolicy }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 46 | name: global-kafka |
| 47 | ports: |
| 48 | - containerPort: 9092 |
| 49 | readinessProbe: |
| 50 | tcpSocket: |
| 51 | port: 9092 |
| 52 | initialDelaySeconds: 5 |
| 53 | periodSeconds: 10 |
| 54 | env: |
| 55 | - name: KAFKA_ZOOKEEPER_CONNECT |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 56 | value: "zookeeper.{{ .Values.nsPrefix }}-message-router:2181" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 57 | - name: KAFKA_ADVERTISED_HOST_NAME |
| 58 | value: "global-kafka" |
| 59 | - name: KAFKA_BROKER_ID |
| 60 | value: "1" |
| 61 | - name: KAFKA_ADVERTISED_PORT |
| 62 | value: "9092" |
| 63 | - name: KAFKA_PORT |
| 64 | value: "9092" |
| 65 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 66 | - mountPath: /etc/localtime |
| 67 | name: localtime |
| 68 | readOnly: true |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 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: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 77 | - name: localtime |
| 78 | hostPath: |
| 79 | path: /etc/localtime |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 80 | - name: docker-socket |
| 81 | hostPath: |
| 82 | path: /var/run/docker.sock |
| 83 | - name: kafka-data |
BorislavG | 66a9a5c | 2017-09-06 15:12:46 +0300 | [diff] [blame] | 84 | persistentVolumeClaim: |
| 85 | claimName: message-router-kafka |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 86 | - name: start-kafka |
| 87 | hostPath: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 88 | 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] | 89 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 90 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 91 | #{{ end }} |