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