blob: 1a954c86327919102b18a6962cc377be797bc759 [file] [log] [blame]
vaibhav_16dece04b2fe2018-03-22 09:07:12 +00001# Copyright © 2017 Amdocs, Bell Canada
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
yurynfcef9942017-10-26 17:10:50 +030015#{{ if not .Values.disableDcaeCdap }}
Mike Elliott586f03b2017-09-08 12:46:15 -040016apiVersion: extensions/v1beta1
17kind: Deployment
18metadata:
19 annotations:
20 deployment.kubernetes.io/revision: "1"
21 labels:
22 app: cdap1
23 name: cdap1
BorislavG8bfc6cf2018-02-27 15:04:26 +000024 namespace: "{{ .Values.nsPrefix }}"
Mike Elliott586f03b2017-09-08 12:46:15 -040025spec:
26 selector:
27 matchLabels:
28 app: cdap1
29 strategy:
30 rollingUpdate:
31 maxSurge: 1
32 maxUnavailable: 1
33 type: RollingUpdate
34 template:
35 metadata:
36 labels:
37 app: cdap1
38 name: cdap1
Mike Elliott586f03b2017-09-08 12:46:15 -040039 spec:
kiranyadc55bbc2017-11-22 14:22:04 +000040 initContainers:
41 - 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"]
42 name: create-fs
43 image: {{ .Values.image.cdapfs }}
44 imagePullPolicy: {{ .Values.pullPolicy }}
45 volumeMounts:
46 - mountPath: /cdap
47 name: cdap-root
Mike Elliott586f03b2017-09-08 12:46:15 -040048 hostname: zldcprivatecloudtruecdap01
49 containers:
50 - image: {{ .Values.image.cdap }}
51 imagePullPolicy: {{ .Values.pullPolicy }}
52 command: ["/bin/bash"]
53 args: ["-c", "cat /cdap/pod-ip/* >> /etc/hosts; /usr/local/bin/01-entrypoint.sh; sleep infinity;"]
54 name: cdap1
55 ports:
56 - containerPort: 8020
57 protocol: TCP
58 - containerPort: 8025
59 protocol: TCP
60 - containerPort: 50070
61 protocol: TCP
62 - containerPort: 50075
63 protocol: TCP
64 - containerPort: 50010
65 protocol: TCP
66 - containerPort: 50020
67 protocol: TCP
68 - containerPort: 3888
69 protocol: TCP
70 - containerPort: 2888
71 protocol: TCP
72 - containerPort: 2181
73 protocol: TCP
74 volumeMounts:
75 - mountPath: /cdap
76 name: cdap-root
77 - mountPath: /opt/tools
78 name: dcae-cdap1-opt-tools
79 - mountPath: /opt/data
80 name: dcae-cdap1-opt-data
81 volumes:
82 - name: cdap-root
83 hostPath:
84 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/dcae/cdap
85 - name: dcae-cdap1-opt-tools
86 hostPath:
87 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/dcae/cdap/cdap1-opt-tools
88 - name: dcae-cdap1-opt-data
89 hostPath:
90 path: /dockerdata-nfs/{{ .Values.nsPrefix }}/dcae/cdap/cdap1-opt-data
91 imagePullSecrets:
92 - name: "{{ .Values.nsPrefix }}-docker-registry-key"
kiranyadc55bbc2017-11-22 14:22:04 +000093#{{ end }}