blob: 64f69d32dd71a62a3895f16a7e7eec526dd92517 [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: cdap1
9 name: cdap1
10 namespace: "{{ .Values.nsPrefix }}-dcae"
11spec:
12 selector:
13 matchLabels:
14 app: cdap1
15 strategy:
16 rollingUpdate:
17 maxSurge: 1
18 maxUnavailable: 1
19 type: RollingUpdate
20 template:
21 metadata:
22 labels:
23 app: cdap1
24 name: cdap1
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/{cdap1-opt-tools,cdap1-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: zldcprivatecloudtruecdap01
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: cdap1
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-cdap1-opt-tools
72 - mountPath: /opt/data
73 name: dcae-cdap1-opt-data
74 volumes:
75 - name: cdap-root
76 hostPath:
77 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/dcae/cdap
78 - name: dcae-cdap1-opt-tools
79 hostPath:
80 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/dcae/cdap/cdap1-opt-tools
81 - name: dcae-cdap1-opt-data
82 hostPath:
83 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/dcae/cdap/cdap1-opt-data
84 imagePullSecrets:
85 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
yurynfcef9942017-10-26 17:10:50 +030086#{{ end }}