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