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