Config seg sdc deployment
[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   selector:
9     matchLabels:
10       app: model-loader-service
11   template:
12     metadata:
13       labels:
14         app: model-loader-service
15       name: model-loader-service
16     spec:
17       containers:
18       - name: model-loader-service
19         image: "{{ .Values.image.modelLoaderImage }}:{{ .Values.image.modelLoaderVersion }}"
20         imagePullPolicy: {{ .Values.pullPolicy }}
21         env:
22         - name: CONFIG_HOME
23           value: /opt/app/model-loader/config/
24         volumeMounts:
25         - mountPath: /etc/localtime
26           name: localtime
27           readOnly: true
28         - mountPath: /opt/app/model-loader/config/model-loader.properties
29           subPath: model-loader.properties
30           name: aai-model-loader-prop-config
31         - mountPath: /opt/app/model-loader/config/auth/
32           name: aai-model-loader-auth-config
33         - mountPath: /var/log/onap
34           name: aai-model-loader-logs
35         - mountPath: /opt/app/model-loader/bundleconfig/etc/logback.xml
36           name: aai-model-loader-log-conf
37           subPath: logback.xml
38         ports:
39         - containerPort: 8080
40         - containerPort: 8443
41       - name: filebeat-onap-aai-model-loader
42         image: {{ .Values.image.filebeat }}
43         imagePullPolicy: {{ .Values.pullPolicy }}
44         volumeMounts:
45         - mountPath: /usr/share/filebeat/filebeat.yml
46           subPath: filebeat.yml
47           name: filebeat-conf
48         - mountPath: /var/log/onap
49           name: aai-model-loader-logs
50         - mountPath: /usr/share/filebeat/data
51           name: aai-model-loader-filebeat
52       volumes:
53       - name: localtime
54         hostPath:
55           path: /etc/localtime
56       - name: aai-model-loader-prop-config
57         configMap:
58           name: model-loader-prop-configmap
59       - name: aai-model-loader-auth-config
60         secret:
61           secretName: model-loader-secret
62       - name: filebeat-conf
63         configMap:
64           name: aai-filebeat-configmap
65       - name: aai-model-loader-logs
66         emptyDir: {}
67       - name: aai-model-loader-filebeat
68         emptyDir: {}
69       - name: aai-model-loader-log-conf
70         configMap:
71          name: aai-model-loader-configmap
72       restartPolicy: Always
73       imagePullSecrets:
74       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
75 ---
76 apiVersion: v1
77 kind: ConfigMap
78 metadata:
79   name: aai-model-loader-configmap
80   namespace: {{ .Values.nsPrefix }}-aai
81 data:
82 {{ (.Files.Glob "resources/model-loader/conf/logback.xml").AsConfig | indent 2 }}
83 #{{ end }}