blob: 067c57d412264d13962f8fce97f89ba31a23baca [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
Mike Elliottd32d36e2018-02-12 15:54:03 -050089 - mountPath: /var/log/onap
90 name: so-logs
91 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.network.xml
92 name: so-logback
93 subPath: logback.network.xml
94 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.tenant.xml
95 name: so-logback
96 subPath: logback.tenant.xml
97 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.vnf.xml
98 name: so-logback
99 subPath: logback.vnf.xml
100 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.vfc.xml
101 name: so-logback
102 subPath: logback.vfc.xml
103 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-api-handler-infra-config/logback.apihandler-infra.xml
104 name: so-logback
105 subPath: logback.apihandler-infra.xml
106 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-appc-adapter-config/logback.appc.xml
107 name: so-logback
108 subPath: logback.appc.xml
109 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-requests-db-adapter-config/logback.msorequestsdbadapter.xml
110 name: so-logback
111 subPath: logback.msorequestsdbadapter.xml
112 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-asdc-controller-config/logback.asdc.xml
113 name: so-logback
114 subPath: logback.asdc.xml
115 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-sdnc-adapter-config/logback.sdnc.xml
116 name: so-logback
117 subPath: logback.sdnc.xml
118 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-bpmn-config/logback.bpmn.xml
119 name: so-logback
120 subPath: logback.bpmn.xml
121 - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-workflow-message-adapter-config/logback.workflow-message-adapter.xml
122 name: so-logback
123 subPath: logback.workflow-message-adapter.xml
124 resources:
125{{ toYaml .Values.resources | indent 12 }}
126 {{- if .Values.nodeSelector }}
127 nodeSelector:
128{{ toYaml .Values.nodeSelector | indent 10 }}
129 {{- end -}}
130 {{- if .Values.affinity }}
131 affinity:
132{{ toYaml .Values.affinity | indent 10 }}
133 {{- end }}
Mandeep Khinda0fe4eb72018-04-20 21:02:45 +0000134
Mike Elliottd32d36e2018-02-12 15:54:03 -0500135 # side car containers
136 - name: filebeat-onap
137 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
138 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
139 volumeMounts:
140 - mountPath: /usr/share/filebeat/filebeat.yml
141 name: filebeat-conf
142 subPath: filebeat.yml
143 - mountPath: /var/log/onap
144 name: so-logs
145 - mountPath: /usr/share/filebeat/data
146 name: so-data-filebeat
147
148 volumes:
149 - name: localtime
150 hostPath:
151 path: /etc/localtime
152 - name: so-logback
153 configMap:
154 name: so-log-configmap
155 - name: filebeat-conf
156 configMap:
157 name: so-filebeat-configmap
158 - name: so
159 configMap:
160 name: so-configmap
161 items:
162 - key: mso-docker.json
163 path: mso-docker.json
164 mode: 0755
Mike Elliott4bf91422018-05-09 16:17:17 -0400165 - key: onap-ca.crt
166 path: onap-ca.crt
Mike Elliottd32d36e2018-02-12 15:54:03 -0500167 mode: 0755
168 - key: encryption.key
169 path: encryption.key
170 mode: 0644
171 - name: so-config
172 configMap:
173 name: so-configmap
174 items:
175 - key: standalone-full-ha-mso.xml
176 path: standalone-full-ha-mso.xml
177 mode: 0644
178 - name: so-logs
179 emptyDir: {}
180 - name: so-data-filebeat
181 emptyDir: {}
182 - name: so-docker-files
183 configMap:
184 name: so-docker-file-configmap
185 items:
186 - key: start-jboss-server.sh
187 path: start-jboss-server.sh
188 mode: 0755
189 imagePullSecrets:
Mandeep Khindaa57d8dd2018-03-09 14:29:37 +0000190 - name: "{{ include "common.namespace" . }}-docker-registry-key"
Jerome Doucerain96bebdc2018-03-17 16:03:08 -0400191