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: |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 5 | name: message-router-global-kafka |
| 6 | namespace: "{{ .Values.nsPrefix }}" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 7 | spec: |
vaibhav_16dec | a6719fe | 2018-02-14 09:48:43 +0000 | [diff] [blame] | 8 | replicas: {{ .Values.kafkaReplicas }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 9 | selector: |
| 10 | matchLabels: |
| 11 | app: global-kafka |
| 12 | template: |
| 13 | metadata: |
| 14 | labels: |
| 15 | app: global-kafka |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 16 | name: message-router-global-kafka |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 17 | spec: |
kiranya | 3561e01 | 2017-11-22 13:45:35 +0000 | [diff] [blame] | 18 | initContainers: |
| 19 | - command: |
| 20 | - /root/ready.py |
| 21 | args: |
| 22 | - --container-name |
| 23 | - zookeeper |
| 24 | env: |
| 25 | - name: NAMESPACE |
| 26 | valueFrom: |
| 27 | fieldRef: |
| 28 | apiVersion: v1 |
| 29 | fieldPath: metadata.namespace |
| 30 | image: {{ .Values.image.readiness }} |
| 31 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 32 | name: kafka-readiness |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 33 | containers: |
kerenj | 9e77b21 | 2017-08-23 08:40:41 +0000 | [diff] [blame] | 34 | - image: {{ .Values.image.kafka }} |
| 35 | imagePullPolicy: {{ .Values.pullPolicy }} |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 36 | name: global-kafka |
| 37 | ports: |
| 38 | - containerPort: 9092 |
| 39 | readinessProbe: |
| 40 | tcpSocket: |
| 41 | port: 9092 |
| 42 | initialDelaySeconds: 5 |
| 43 | periodSeconds: 10 |
| 44 | env: |
| 45 | - name: KAFKA_ZOOKEEPER_CONNECT |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 46 | value: "zookeeper.{{ .Values.nsPrefix }}:2181" |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 47 | - name: KAFKA_ADVERTISED_HOST_NAME |
| 48 | value: "global-kafka" |
| 49 | - name: KAFKA_BROKER_ID |
| 50 | value: "1" |
| 51 | - name: KAFKA_ADVERTISED_PORT |
| 52 | value: "9092" |
| 53 | - name: KAFKA_PORT |
| 54 | value: "9092" |
| 55 | volumeMounts: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 56 | - mountPath: /etc/localtime |
| 57 | name: localtime |
| 58 | readOnly: true |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 59 | - mountPath: /var/run/docker.sock |
| 60 | name: docker-socket |
| 61 | - mountPath: /kafka |
| 62 | name: kafka-data |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 63 | restartPolicy: Always |
| 64 | volumes: |
yuryn | 8b3bc5a | 2017-09-13 19:21:03 +0300 | [diff] [blame] | 65 | - name: localtime |
| 66 | hostPath: |
| 67 | path: /etc/localtime |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 68 | - name: docker-socket |
| 69 | hostPath: |
| 70 | path: /var/run/docker.sock |
| 71 | - name: kafka-data |
BorislavG | 66a9a5c | 2017-09-06 15:12:46 +0300 | [diff] [blame] | 72 | persistentVolumeClaim: |
| 73 | claimName: message-router-kafka |
Borislav Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 74 | imagePullSecrets: |
Mandeep Khinda | 0e8f889 | 2017-08-25 03:31:17 +0000 | [diff] [blame] | 75 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
kiranya | 3561e01 | 2017-11-22 13:45:35 +0000 | [diff] [blame] | 76 | #{{ end }} |