yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 1 | #{{ if not .Values.disableDcaeCdap }} |
Mike Elliott | 586f03b | 2017-09-08 12:46:15 -0400 | [diff] [blame] | 2 | apiVersion: extensions/v1beta1 |
| 3 | kind: Deployment |
| 4 | metadata: |
| 5 | annotations: |
| 6 | deployment.kubernetes.io/revision: "1" |
| 7 | labels: |
| 8 | app: cdap2 |
| 9 | name: cdap2 |
| 10 | namespace: "{{ .Values.nsPrefix }}-dcae" |
| 11 | spec: |
| 12 | selector: |
| 13 | matchLabels: |
| 14 | app: cdap2 |
| 15 | strategy: |
| 16 | rollingUpdate: |
| 17 | maxSurge: 1 |
| 18 | maxUnavailable: 1 |
| 19 | type: RollingUpdate |
| 20 | template: |
| 21 | metadata: |
| 22 | labels: |
| 23 | app: cdap2 |
| 24 | name: cdap2 |
| 25 | annotations: |
| 26 | pod.beta.kubernetes.io/init-containers: '[ |
| 27 | { |
| 28 | "name": "create-fs", |
| 29 | "image": "{{ .Values.image.cdapfs }}", |
| 30 | "imagePullPolicy": "{{ .Values.pullPolicy }}", |
| 31 | "command": ["/bin/bash", "-c", "mkdir -p /cdap/{cdap2-opt-tools,cdap2-opt-data}; grep `hostname` /etc/hosts > /cdap/pod-ip/`hostname`_ip.txt; while [`ls /cdap/pod-ip | wc -l` < 3]; do sleep 1; done"], |
| 32 | "volumeMounts": [ |
| 33 | { |
| 34 | "mountPath": "/cdap", |
| 35 | "name": "cdap-root" |
| 36 | } |
| 37 | ] |
| 38 | } |
| 39 | ]' |
| 40 | spec: |
| 41 | hostname: zldcprivatecloudtruecdap02 |
| 42 | containers: |
| 43 | - image: {{ .Values.image.cdap }} |
| 44 | imagePullPolicy: {{ .Values.pullPolicy }} |
| 45 | command: ["/bin/bash"] |
| 46 | args: ["-c", "cat /cdap/pod-ip/* >> /etc/hosts; /usr/local/bin/01-entrypoint.sh; sleep infinity;"] |
| 47 | name: cdap2 |
| 48 | ports: |
| 49 | - containerPort: 8020 |
| 50 | protocol: TCP |
| 51 | - containerPort: 8025 |
| 52 | protocol: TCP |
| 53 | - containerPort: 50070 |
| 54 | protocol: TCP |
| 55 | - containerPort: 50075 |
| 56 | protocol: TCP |
| 57 | - containerPort: 50010 |
| 58 | protocol: TCP |
| 59 | - containerPort: 50020 |
| 60 | protocol: TCP |
| 61 | - containerPort: 3888 |
| 62 | protocol: TCP |
| 63 | - containerPort: 2888 |
| 64 | protocol: TCP |
| 65 | - containerPort: 2181 |
| 66 | protocol: TCP |
| 67 | volumeMounts: |
| 68 | - mountPath: /cdap |
| 69 | name: cdap-root |
| 70 | - mountPath: /opt/tools |
| 71 | name: dcae-cdap2-opt-tools |
| 72 | - mountPath: /opt/data |
| 73 | name: dcae-cdap2-opt-data |
| 74 | volumes: |
| 75 | - name: cdap-root |
| 76 | hostPath: |
| 77 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/dcae/cdap |
| 78 | - name: dcae-cdap2-opt-tools |
| 79 | hostPath: |
| 80 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/dcae/cdap/cdap2-opt-tools |
| 81 | - name: dcae-cdap2-opt-data |
| 82 | hostPath: |
| 83 | path: /dockerdata-nfs/{{ .Values.nsPrefix }}/dcae/cdap/cdap2-opt-data |
| 84 | imagePullSecrets: |
| 85 | - name: "{{ .Values.nsPrefix }}-docker-registry-key" |
yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 86 | #{{ end }} |