blob: bc01727bd327f4b33f264c45b717f10b57aad06b [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
Mike Elliottd32d36e2018-02-12 15:54:03 -050015apiVersion: extensions/v1beta1
16kind: Deployment
17metadata:
Mandeep Khindaa57d8dd2018-03-09 14:29:37 +000018 name: {{ include "common.fullname" . }}
Mike Elliottd32d36e2018-02-12 15:54:03 -050019 namespace: {{ include "common.namespace" . }}
20 labels:
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
23 release: {{ .Release.Name }}
24 heritage: {{ .Release.Service }}
25spec:
26 replicas: {{ .Values.replicaCount }}
27 template:
28 metadata:
29 labels:
30 app: {{ include "common.name" . }}
31 release: {{ .Release.Name }}
32 spec:
33 initContainers:
34 - command:
35 - /root/ready.py
36 args:
37 - --container-name
Mike Elliott282751f2018-04-19 17:24:08 -040038 - {{ .Values.mariadb.nameOverride }}
Mike Elliottd32d36e2018-02-12 15:54:03 -050039 env:
40 - name: NAMESPACE
41 valueFrom:
42 fieldRef:
43 apiVersion: v1
44 fieldPath: metadata.namespace
45 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
46 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
47 name: {{ include "common.name" . }}-readiness
48 containers:
49 - name: {{ .Chart.Name }}
50 command:
51 - /tmp/start-jboss-server.sh
Mike Elliott282751f2018-04-19 17:24:08 -040052 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
Mike Elliottd32d36e2018-02-12 15:54:03 -050053 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
54 ports:
55 - containerPort: {{ .Values.service.internalPort }}
56 - containerPort: {{ .Values.service.internalPort2 }}
57 - containerPort: {{ .Values.service.internalPort3 }}
58 - containerPort: {{ .Values.service.internalPort4 }}
59 - containerPort: {{ .Values.service.internalPort5 }}
60 # disable liveness probe when breakpoints set in debugger
Mike Elliott282751f2018-04-19 17:24:08 -040061 # so K8s doesn't restart unresponsive container
62 {{ if .Values.liveness.enabled }}
Mike Elliottd32d36e2018-02-12 15:54:03 -050063 livenessProbe:
64 tcpSocket:
65 port: {{ .Values.service.internalPort }}
66 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
67 periodSeconds: {{ .Values.liveness.periodSeconds }}
Mike Elliott282751f2018-04-19 17:24:08 -040068 {{ end }}
Mike Elliottd32d36e2018-02-12 15:54:03 -050069 readinessProbe:
70 tcpSocket:
71 port: {{ .Values.service.internalPort }}
72 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
73 periodSeconds: {{ .Values.readiness.periodSeconds }}
74 env:
75 - name: JBOSS_DEBUG
76 value: {{ .Values.global.debugEnabled | default .Values.debugEnabled | quote }}
77 volumeMounts:
78 - mountPath: /etc/localtime
79 name: localtime
80 readOnly: true
81 - mountPath: /shared/
82 name: so
83 - mountPath: /tmp/start-jboss-server.sh
84 name: so-docker-files
85 subPath: start-jboss-server.sh
86 - mountPath: /opt/jboss/standalone/configuration/standalone-full-ha-mso.xml
87 name: so-config
88 subPath: standalone-full-ha-mso.xml
BorislavGcaf4a502018-04-17 14:24:11 +000089 - mountPath: /etc/mso/config.d/topology.properties
90 name: so-config
91 subPath: topology.properties
92 - mountPath: /etc/mso/config.d/mso.workflow-message-adapter.properties
93 name: so-config
94 subPath: mso.workflow-message-adapter.properties
95 - mountPath: /etc/mso/config.d/mso.bpmn.urn.properties
96 name: so-config
97 subPath: mso.bpmn.urn.properties
Mike Elliottd32d36e2018-02-12 15:54:03 -050098
99 - mountPath: /var/log/onap
100 name: so-logs
101 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.network.xml
102 name: so-logback
103 subPath: logback.network.xml
104 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.tenant.xml
105 name: so-logback
106 subPath: logback.tenant.xml
107 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.vnf.xml
108 name: so-logback
109 subPath: logback.vnf.xml
110 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.vfc.xml
111 name: so-logback
112 subPath: logback.vfc.xml
113 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-api-handler-infra-config/logback.apihandler-infra.xml
114 name: so-logback
115 subPath: logback.apihandler-infra.xml
116 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-appc-adapter-config/logback.appc.xml
117 name: so-logback
118 subPath: logback.appc.xml
119 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-requests-db-adapter-config/logback.msorequestsdbadapter.xml
120 name: so-logback
121 subPath: logback.msorequestsdbadapter.xml
122 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-asdc-controller-config/logback.asdc.xml
123 name: so-logback
124 subPath: logback.asdc.xml
125 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-sdnc-adapter-config/logback.sdnc.xml
126 name: so-logback
127 subPath: logback.sdnc.xml
128 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-bpmn-config/logback.bpmn.xml
129 name: so-logback
130 subPath: logback.bpmn.xml
131 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-workflow-message-adapter-config/logback.workflow-message-adapter.xml
132 name: so-logback
133 subPath: logback.workflow-message-adapter.xml
134 resources:
135{{ toYaml .Values.resources | indent 12 }}
136 {{- if .Values.nodeSelector }}
137 nodeSelector:
138{{ toYaml .Values.nodeSelector | indent 10 }}
139 {{- end -}}
140 {{- if .Values.affinity }}
141 affinity:
142{{ toYaml .Values.affinity | indent 10 }}
143 {{- end }}
144
145 # side car containers
146 - name: filebeat-onap
147 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
148 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
149 volumeMounts:
150 - mountPath: /usr/share/filebeat/filebeat.yml
151 name: filebeat-conf
152 subPath: filebeat.yml
153 - mountPath: /var/log/onap
154 name: so-logs
155 - mountPath: /usr/share/filebeat/data
156 name: so-data-filebeat
157
158 volumes:
159 - name: localtime
160 hostPath:
161 path: /etc/localtime
162 - name: so-logback
163 configMap:
164 name: so-log-configmap
165 - name: filebeat-conf
166 configMap:
167 name: so-filebeat-configmap
168 - name: so
169 configMap:
170 name: so-configmap
171 items:
172 - key: mso-docker.json
173 path: mso-docker.json
174 mode: 0755
175 - key: aai.crt
176 path: aai.crt
177 mode: 0755
178 - key: encryption.key
179 path: encryption.key
180 mode: 0644
181 - name: so-config
182 configMap:
183 name: so-configmap
184 items:
185 - key: standalone-full-ha-mso.xml
186 path: standalone-full-ha-mso.xml
187 mode: 0644
BorislavGcaf4a502018-04-17 14:24:11 +0000188 - key: topology.properties
189 path: topology.properties
190 mode: 0644
191 - key: mso.workflow-message-adapter.properties
192 path: mso.workflow-message-adapter.properties
193 mode: 0644
194 - key: mso.bpmn.urn.properties
195 path: mso.bpmn.urn.properties
196 mode: 0644
Mike Elliottd32d36e2018-02-12 15:54:03 -0500197 - name: so-logs
198 emptyDir: {}
199 - name: so-data-filebeat
200 emptyDir: {}
201 - name: so-docker-files
202 configMap:
203 name: so-docker-file-configmap
204 items:
205 - key: start-jboss-server.sh
206 path: start-jboss-server.sh
207 mode: 0755
208 imagePullSecrets:
Mandeep Khindaa57d8dd2018-03-09 14:29:37 +0000209 - name: "{{ include "common.namespace" . }}-docker-registry-key"
Jerome Doucerain96bebdc2018-03-17 16:03:08 -0400210