License addition in all yamls
[oom.git] / kubernetes / mso / templates / mso-deployment.yaml
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
15 #{{ if not .Values.disableMsoMso }}
16 apiVersion: extensions/v1beta1
17 kind: Deployment
18 metadata:
19   name: mso
20   namespace: "{{ .Values.nsPrefix }}"
21 spec:
22   replicas: {{ .Values.msoReplicas }}
23   selector:
24     matchLabels:
25       app: mso
26   template:
27     metadata:
28       labels:
29         app: mso
30       name: mso
31     spec:
32       initContainers:
33       - command:
34         - /root/ready.py
35         args:
36         - --container-name
37         - mso-mariadb
38         env:
39         - name: NAMESPACE
40           valueFrom:
41             fieldRef:
42               apiVersion: v1
43               fieldPath: metadata.namespace
44         image: {{ .Values.image.readiness }}
45         imagePullPolicy: {{ .Values.pullPolicy }}
46         name: mso-readiness
47       containers:
48       - command:
49         - /tmp/start-jboss-server.sh
50         image: {{ .Values.image.mso }}
51         imagePullPolicy: {{ .Values.pullPolicy }}
52         name: mso
53         volumeMounts:
54         - mountPath: /etc/localtime
55           name: localtime
56           readOnly: true
57         - mountPath: /shared/
58           name: mso
59         - mountPath: /tmp/start-jboss-server.sh
60           name: mso-docker-files
61           subPath: start-jboss-server.sh
62         - mountPath: /opt/jboss/standalone/configuration/standalone-full-ha-mso.xml
63           name: mso-jboss-config
64           subPath: standalone-full-ha-mso.xml
65         - mountPath: /var/log/onap
66           name: mso-logs
67         - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.network.xml
68           name: mso-logback
69           subPath: logback.network.xml
70         - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.tenant.xml
71           name: mso-logback
72           subPath: logback.tenant.xml
73         - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.vnf.xml
74           name: mso-logback
75           subPath: logback.vnf.xml
76         - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.vfc.xml
77           name: mso-logback
78           subPath: logback.vfc.xml
79         - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-api-handler-infra-config/logback.apihandler-infra.xml
80           name: mso-logback
81           subPath: logback.apihandler-infra.xml
82         - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-appc-adapter-config/logback.appc.xml
83           name: mso-logback
84           subPath: logback.appc.xml
85         - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-requests-db-adapter-config/logback.msorequestsdbadapter.xml
86           name: mso-logback
87           subPath: logback.msorequestsdbadapter.xml
88         - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-asdc-controller-config/logback.asdc.xml
89           name: mso-logback
90           subPath: logback.asdc.xml
91         - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-sdnc-adapter-config/logback.sdnc.xml
92           name: mso-logback
93           subPath: logback.sdnc.xml
94         - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-bpmn-config/logback.bpmn.xml
95           name: mso-logback
96           subPath: logback.bpmn.xml
97         - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-workflow-message-adapter-config/logback.workflow-message-adapter.xml
98           name: mso-logback
99           subPath: logback.workflow-message-adapter.xml
100         env:
101         - name: JBOSS_DEBUG
102           value: "false"
103         ports:
104         - containerPort: 3904
105         - containerPort: 3905
106         - containerPort: 8080
107         - containerPort: 9990
108         - containerPort: 8787
109         readinessProbe:
110           tcpSocket:
111             port: 8080
112           initialDelaySeconds: 5
113           periodSeconds: 10
114       - image: {{ .Values.image.filebeat }}
115         imagePullPolicy: {{ .Values.pullPolicy }}
116         name: filebeat-onap
117         volumeMounts:
118         - mountPath: /usr/share/filebeat/filebeat.yml
119           name: filebeat-conf
120           subPath: filebeat.yml
121         - mountPath: /var/log/onap
122           name: mso-logs
123         - mountPath: /usr/share/filebeat/data
124           name: mso-data-filebeat
125       volumes:
126         - name: localtime
127           hostPath:
128             path: /etc/localtime
129         - name: mso-logback
130           configMap:
131             name: mso-log-configmap
132         - name: filebeat-conf
133           configMap:
134             name: mso-filebeat-configmap
135         - name: mso
136           configMap:
137             name: mso-config-mso-configmap
138             items:
139             - key: mso-docker.json
140               path: mso-docker.json
141               mode: 0755
142             - key: aai.crt
143               path: aai.crt
144               mode: 0755
145             - key: encryption.key
146               path: encryption.key
147               mode: 0644
148         - name: mso-logs
149           emptyDir: {}
150         - name: mso-data-filebeat
151           emptyDir: {}
152         - name: mso-docker-files
153           configMap:
154             name: mso-docker-file-configmap
155             items:
156             - key: start-jboss-server.sh
157               path: start-jboss-server.sh
158               mode: 0755
159         - name: mso-jboss-config
160           configMap:
161             name: mso-jboss-configmap
162       imagePullSecrets:
163       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
164 #{{ end }}