vaibhav_16dec | e04b2fe | 2018-03-22 09:07:12 +0000 | [diff] [blame] | 1 | # 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 | |
yuryn | fcef994 | 2017-10-26 17:10:50 +0300 | [diff] [blame] | 15 | #{{ if not .Values.disableDcaeCdap }} |
Mike Elliott | 586f03b | 2017-09-08 12:46:15 -0400 | [diff] [blame] | 16 | apiVersion: extensions/v1beta1 |
| 17 | kind: Deployment |
| 18 | metadata: |
| 19 | annotations: |
| 20 | deployment.kubernetes.io/revision: "1" |
| 21 | labels: |
| 22 | app: cdap1 |
| 23 | name: cdap1 |
BorislavG | 8bfc6cf | 2018-02-27 15:04:26 +0000 | [diff] [blame] | 24 | namespace: "{{ .Values.nsPrefix }}" |
Mike Elliott | 586f03b | 2017-09-08 12:46:15 -0400 | [diff] [blame] | 25 | spec: |
| 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 Elliott | 586f03b | 2017-09-08 12:46:15 -0400 | [diff] [blame] | 39 | spec: |
kiranya | dc55bbc | 2017-11-22 14:22:04 +0000 | [diff] [blame] | 40 | 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 Elliott | 586f03b | 2017-09-08 12:46:15 -0400 | [diff] [blame] | 48 | 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" |
kiranya | dc55bbc | 2017-11-22 14:22:04 +0000 | [diff] [blame] | 93 | #{{ end }} |