License addition in all yamls
[oom.git] / kubernetes / aai / templates / modelloader-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.disableAaiModelLoaderService }}
16 apiVersion: extensions/v1beta1
17 kind: Deployment
18 metadata:
19   name: aai-model-loader-service
20   namespace: "{{ .Values.nsPrefix }}"
21 spec:
22   replicas: {{ .Values.modelLoaderReplicas }}
23   selector:
24     matchLabels:
25       app: model-loader-service
26   template:
27     metadata:
28       labels:
29         app: model-loader-service
30       name: aai-model-loader-service
31     spec:
32       containers:
33       - name: model-loader-service
34         image: "{{ .Values.image.modelLoaderImage }}:{{ .Values.image.modelLoaderVersion }}"
35         imagePullPolicy: {{ .Values.pullPolicy }}
36         env:
37         - name: CONFIG_HOME
38           value: /opt/app/model-loader/config/
39         volumeMounts:
40         - mountPath: /etc/localtime
41           name: localtime
42           readOnly: true
43         - mountPath: /opt/app/model-loader/config/model-loader.properties
44           subPath: model-loader.properties
45           name: aai-model-loader-prop-config
46         - mountPath: /opt/app/model-loader/config/auth/
47           name: aai-model-loader-auth-config
48         - mountPath: /var/log/onap
49           name: aai-model-loader-logs
50         - mountPath: /opt/app/model-loader/bundleconfig/etc/logback.xml
51           name: aai-model-loader-log-conf
52           subPath: logback.xml
53         ports:
54         - containerPort: 8080
55         - containerPort: 8443
56       - name: filebeat-onap-aai-model-loader
57         image: {{ .Values.image.filebeat }}
58         imagePullPolicy: {{ .Values.pullPolicy }}
59         volumeMounts:
60         - mountPath: /usr/share/filebeat/filebeat.yml
61           subPath: filebeat.yml
62           name: filebeat-conf
63         - mountPath: /var/log/onap
64           name: aai-model-loader-logs
65         - mountPath: /usr/share/filebeat/data
66           name: aai-model-loader-filebeat
67       volumes:
68       - name: localtime
69         hostPath:
70           path: /etc/localtime
71       - name: aai-model-loader-prop-config
72         configMap:
73           name: aai-model-loader-prop-configmap
74       - name: aai-model-loader-auth-config
75         secret:
76           secretName: aai-model-loader-secret
77       - name: filebeat-conf
78         configMap:
79           name: aai-filebeat-configmap
80       - name: aai-model-loader-logs
81         emptyDir: {}
82       - name: aai-model-loader-filebeat
83         emptyDir: {}
84       - name: aai-model-loader-log-conf
85         configMap:
86          name: aai-model-loader-log-configmap
87       restartPolicy: Always
88       imagePullSecrets:
89       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
90 #{{ end }}