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