[AAI] Remove unused AAF proxies
[oom.git] / kubernetes / aai / components / aai-search-data / templates / deployment.yaml
1 {{/*
2 # Copyright © 2017 Amdocs, Bell Canada
3 # Modifications Copyright © 2018 AT&T
4 # Modifications Copyright © 2020,2021 Orange
5 #
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #       http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 */}}
18
19 apiVersion: apps/v1
20 kind: Deployment
21 metadata:
22   name: {{ include "common.fullname" . }}
23   namespace: {{ include "common.namespace" . }}
24   labels:
25     app: {{ include "common.name" . }}
26     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
27     release: {{ include "common.release" . }}
28     heritage: {{ .Release.Service }}
29 spec:
30   replicas: {{ .Values.replicaCount }}
31   selector:
32     matchLabels:
33       app: {{ include "common.name" . }}
34   template:
35     metadata:
36       labels:
37         app: {{ include "common.name" . }}
38         release: {{ include "common.release" . }}
39       name: {{ include "common.name" . }}
40     spec:
41       containers:
42       - name: {{ include "common.name" . }}
43         image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
44         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
45         env:
46         - name: CONFIG_HOME
47           value: /opt/app/search-data-service/config/
48         - name: KEY_STORE_PASSWORD
49           value: {{ .Values.config.keyStorePassword }}
50         - name: KEY_MANAGER_PASSWORD
51           value: {{ .Values.config.keyManagerPassword }}
52         volumeMounts:
53         - mountPath: /etc/localtime
54           name: localtime
55           readOnly: true
56         - mountPath: /opt/app/search-data-service/config/filter-config.json
57           subPath: filter-config.json
58           name: {{ include "common.fullname" . }}-service-config
59         - mountPath: /opt/app/search-data-service/config/elastic-search.properties
60           subPath: elastic-search.properties
61           name: {{ include "common.fullname" . }}-service-config
62         - mountPath: /opt/app/search-data-service/config/analysis-config.json
63           subPath: analysis-config.json
64           name: {{ include "common.fullname" . }}-service-config
65         - mountPath: /opt/app/search-data-service/config/es-payload-translation.json
66           subPath: es-payload-translation.json
67           name: {{ include "common.fullname" . }}-service-config
68         - mountPath: /opt/app/search-data-service/config/dynamic-custom-template.json
69           subPath: dynamic-custom-template.json
70           name: {{ include "common.fullname" . }}-service-config
71         - mountPath: /opt/app/search-data-service/config/auth/tomcat_keystore
72           subPath: tomcat_keystore
73           name: {{ include "common.fullname" . }}-service-auth-config
74         - mountPath: /opt/app/search-data-service/config/auth/search_policy.json
75           subPath: search_policy.json
76           name: {{ include "common.fullname" . }}-search-policy-config
77         - mountPath: /var/log/onap
78           name: {{ include "common.fullname" . }}-service-logs
79         - mountPath: /opt/app/search-data-service/bundleconfig/etc/logback.xml
80           name: {{ include "common.fullname" . }}-service-log-conf
81           subPath: logback.xml
82         ports:
83         - containerPort: {{ .Values.service.internalPort }}
84         # disable liveness probe when breakpoints set in debugger
85         # so K8s doesn't restart unresponsive container
86         {{- if eq .Values.liveness.enabled true }}
87         livenessProbe:
88           tcpSocket:
89             port: {{ .Values.service.internalPort }}
90           initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
91           periodSeconds: {{ .Values.liveness.periodSeconds }}
92         {{ end -}}
93         readinessProbe:
94           tcpSocket:
95             port: {{ .Values.service.internalPort }}
96           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
97           periodSeconds: {{ .Values.readiness.periodSeconds }}
98         resources:
99 {{ include "common.resources" . }}
100       {{- if .Values.nodeSelector }}
101       nodeSelector:
102 {{ toYaml .Values.nodeSelector | indent 8 }}
103       {{- end -}}
104       {{- if .Values.affinity }}
105       affinity:
106 {{ toYaml .Values.affinity | indent 8 }}
107       {{- end }}
108
109       # side car containers
110       - name: filebeat-onap
111         image: {{ include "repositoryGenerator.image.logging" . }}
112         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
113         volumeMounts:
114         - mountPath: /usr/share/filebeat/filebeat.yml
115           subPath: filebeat.yml
116           name: filebeat-conf
117         - mountPath: /var/log/onap
118           name: {{ include "common.fullname" . }}-service-logs
119         - mountPath: /usr/share/filebeat/data
120           name: {{ include "common.fullname" . }}-service-filebeat
121       volumes:
122       - name: localtime
123         hostPath:
124           path: /etc/localtime
125       - name: {{ include "common.fullname" . }}-service-config
126         configMap:
127           name: {{ include "common.fullname" . }}
128       - name: {{ include "common.fullname" . }}-service-auth-config
129         secret:
130           secretName: {{ include "common.fullname" . }}-keystone
131       - name: {{ include "common.fullname" . }}-search-policy-config
132         secret:
133           secretName: {{ include "common.fullname" . }}-policy
134       - name: filebeat-conf
135         configMap:
136           name: aai-filebeat
137       - name: {{ include "common.fullname" . }}-service-logs
138         emptyDir: {}
139       - name: {{ include "common.fullname" . }}-service-filebeat
140         emptyDir: {}
141       - name: {{ include "common.fullname" . }}-service-log-conf
142         configMap:
143           name: {{ include "common.fullname" . }}-service-log
144       restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
145       imagePullSecrets:
146       - name: "{{ include "common.namespace" . }}-docker-registry-key"