Add Helm Chart "template" Starter
[oom.git] / kubernetes / aai / templates / modelloader-deployment.yaml
1 #{{ if not .Values.disableAaiModelLoaderService }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   name: model-loader-service
6   namespace: "{{ .Values.nsPrefix }}-aai"
7 spec:
8   replicas: {{ .Values.modelLoaderReplicas }}
9   selector:
10     matchLabels:
11       app: model-loader-service
12   template:
13     metadata:
14       labels:
15         app: model-loader-service
16       name: model-loader-service
17     spec:
18       containers:
19       - name: model-loader-service
20         image: "{{ .Values.image.modelLoaderImage }}:{{ .Values.image.modelLoaderVersion }}"
21         imagePullPolicy: {{ .Values.pullPolicy }}
22         env:
23         - name: CONFIG_HOME
24           value: /opt/app/model-loader/config/
25         volumeMounts:
26         - mountPath: /etc/localtime
27           name: localtime
28           readOnly: true
29         - mountPath: /opt/app/model-loader/config/model-loader.properties
30           subPath: model-loader.properties
31           name: aai-model-loader-prop-config
32         - mountPath: /opt/app/model-loader/config/auth/
33           name: aai-model-loader-auth-config
34         - mountPath: /var/log/onap
35           name: aai-model-loader-logs
36         - mountPath: /opt/app/model-loader/bundleconfig/etc/logback.xml
37           name: aai-model-loader-log-conf
38           subPath: logback.xml
39         ports:
40         - containerPort: 8080
41         - containerPort: 8443
42       - name: filebeat-onap-aai-model-loader
43         image: {{ .Values.image.filebeat }}
44         imagePullPolicy: {{ .Values.pullPolicy }}
45         volumeMounts:
46         - mountPath: /usr/share/filebeat/filebeat.yml
47           subPath: filebeat.yml
48           name: filebeat-conf
49         - mountPath: /var/log/onap
50           name: aai-model-loader-logs
51         - mountPath: /usr/share/filebeat/data
52           name: aai-model-loader-filebeat
53       volumes:
54       - name: localtime
55         hostPath:
56           path: /etc/localtime
57       - name: aai-model-loader-prop-config
58         configMap:
59           name: model-loader-prop-configmap
60       - name: aai-model-loader-auth-config
61         secret:
62           secretName: model-loader-secret
63       - name: filebeat-conf
64         configMap:
65           name: aai-filebeat-configmap
66       - name: aai-model-loader-logs
67         emptyDir: {}
68       - name: aai-model-loader-filebeat
69         emptyDir: {}
70       - name: aai-model-loader-log-conf
71         configMap:
72          name: aai-model-loader-log-configmap
73       restartPolicy: Always
74       imagePullSecrets:
75       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
76 #{{ end }}