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 |
kerenj | 9e77b21 | 2017-08-23 08:40:41 +0000 | [diff] [blame^] | 5 | namespace: {{ .Values.NS }} |
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 |
| 55 | value: "zookeeper.onap-message-router:2181" |
| 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: |
| 65 | - mountPath: /var/run/docker.sock |
| 66 | name: docker-socket |
| 67 | - mountPath: /kafka |
| 68 | name: kafka-data |
| 69 | - mountPath: /start-kafka.sh |
| 70 | name: start-kafka |
| 71 | restartPolicy: Always |
| 72 | volumes: |
| 73 | - name: docker-socket |
| 74 | hostPath: |
| 75 | path: /var/run/docker.sock |
| 76 | - name: kafka-data |
| 77 | hostPath: |
kerenj | 9e77b21 | 2017-08-23 08:40:41 +0000 | [diff] [blame^] | 78 | path: /dockerdata-nfs/onap/message-router/dcae-startup-vm-message-router/docker_files/data-kafka/ |
Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 79 | - name: start-kafka |
| 80 | hostPath: |
kerenj | 9e77b21 | 2017-08-23 08:40:41 +0000 | [diff] [blame^] | 81 | path: /dockerdata-nfs/onap/message-router/dcae-startup-vm-message-router/docker_files/start-kafka.sh |
Borislav Glozman | 5197e2e | 2017-07-24 10:45:28 +0300 | [diff] [blame] | 82 | imagePullSecrets: |
| 83 | - name: onap-docker-registry-key |