blob: 1590f4e001bf1cbd9947aee6953eb38522d5f48a [file] [log] [blame]
Jakub Latusek2bd138d2020-10-21 13:36:29 +02001{{/*
Geora Barsky4b328b82018-08-01 12:02:33 -04002# Copyright © 2017 Amdocs, Bell Canada
3#
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.
Jakub Latusek2bd138d2020-10-21 13:36:29 +020015*/}}
Geora Barsky4b328b82018-08-01 12:02:33 -040016
17apiVersion: extensions/v1beta1
18kind: Deployment
19metadata:
20 name: {{ include "common.fullname" . }}
21 namespace: {{ include "common.namespace" . }}
22 labels:
23 app: {{ include "common.name" . }}
24 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010025 release: {{ include "common.release" . }}
Geora Barsky4b328b82018-08-01 12:02:33 -040026 heritage: {{ .Release.Service }}
27spec:
28 replicas: {{ .Values.replicaCount }}
29 template:
30 metadata:
31 labels:
32 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010033 release: {{ include "common.release" . }}
Geora Barsky4b328b82018-08-01 12:02:33 -040034 spec:
35 containers:
36 - name: {{ include "common.name" . }}
Sylvain Desbureaux93ed0752020-11-21 21:22:18 +010037 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
Geora Barsky4b328b82018-08-01 12:02:33 -040038 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
39 ports:
40 - containerPort: {{ .Values.service.internalPort }}
41 # disable liveness probe when breakpoints set in debugger
42 # so K8s doesn't restart unresponsive container
43 {{ if .Values.liveness.enabled }}
44 livenessProbe:
45 tcpSocket:
46 port: {{ .Values.service.internalPort }}
47 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
48 periodSeconds: {{ .Values.liveness.periodSeconds }}
49 {{ end }}
50 {{ if .Values.readiness.enabled }}
51 readinessProbe:
52 tcpSocket:
53 port: {{ .Values.service.internalPort }}
54 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
55 periodSeconds: {{ .Values.readiness.periodSeconds }}
56 {{ end }}
57 env:
58 - name: APP_HOME
59 value: "{{ .Values.config.appDir }}"
60 - name: CONFIG_HOME
61 value: "{{ .Values.config.configDir }}"
62 - name: MAX_HEAP
63 value: "{{ .Values.config.maxHeap }}"
64 volumeMounts:
65 - mountPath: /etc/localtime
66 name: localtime
67 readOnly: true
68 - mountPath: {{ .Values.config.appDir }}/application.properties
69 name: root-config-app-prop
70 subPath: application.properties
71 - mountPath: {{ .Values.config.configDir }}/
72 name: properties
73 - mountPath: {{ .Values.config.configAuthDir }}/
74 name: config-auth
75 - mountPath: {{ .Values.config.configTopicsDir }}/
76 name: config-topics
Pierre Rioux303680b2018-09-12 15:58:20 -040077 - mountPath: {{ .Values.config.rulesDir }}/
78 name: rules
Geora Barsky4b328b82018-08-01 12:02:33 -040079 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +000080{{ include "common.resources" . | indent 12 }}
Geora Barsky4b328b82018-08-01 12:02:33 -040081 {{- if .Values.nodeSelector }}
82 nodeSelector:
83{{ toYaml .Values.nodeSelector | indent 10 }}
84 {{- end -}}
85 {{- if .Values.affinity }}
86 affinity:
87{{ toYaml .Values.affinity | indent 10 }}
88 {{- end }}
89
jmac76d4a8a2019-02-21 20:03:49 +000090 # Filebeat sidecar container
91 - name: {{ include "common.name" . }}-filebeat-onap
Sylvain Desbureaux93ed0752020-11-21 21:22:18 +010092 image: {{ include "repositoryGenerator.image.logging" . }}
jmac76d4a8a2019-02-21 20:03:49 +000093 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
94 volumeMounts:
95 - name: {{ include "common.fullname" . }}-filebeat-conf
96 mountPath: /usr/share/filebeat/filebeat.yml
97 subPath: filebeat.yml
98 - name: {{ include "common.fullname" . }}-data-filebeat
99 mountPath: /usr/share/filebeat/data
100 - name: {{ include "common.fullname" . }}-logs
101 mountPath: /opt/app/logs
102
Geora Barsky4b328b82018-08-01 12:02:33 -0400103 volumes:
104 - name: localtime
105 hostPath:
106 path: /etc/localtime
jmac76d4a8a2019-02-21 20:03:49 +0000107 - name: {{ include "common.fullname" . }}-filebeat-conf
108 configMap:
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +0100109 name: {{ include "common.release" . }}-pomba-filebeat-configmap
jmac76d4a8a2019-02-21 20:03:49 +0000110 - name: {{ include "common.fullname" . }}-data-filebeat
111 emptyDir: {}
Geora Barsky4b328b82018-08-01 12:02:33 -0400112 - name: root-config-app-prop
113 configMap:
114 name: {{ include "common.fullname" . }}-root-config
115 defaultMode: 0644
jmac76d4a8a2019-02-21 20:03:49 +0000116 - name: {{ include "common.fullname" . }}-logs
117 emptyDir: {}
Geora Barsky4b328b82018-08-01 12:02:33 -0400118 - name: properties
119 configMap:
120 name: {{ include "common.fullname" . }}-config-properties
121 defaultMode: 0644
122 items:
123 - key: validation-service.properties
124 path: validation-service.properties
125 - key: validation-service-auth.properties
126 path: validation-service-auth.properties
127 - key: rule-indexing.properties
128 path: rule-indexing.properties
Pierre Rioux5f4b3db2019-01-09 15:41:17 -0500129 - key: rule-data-dictionary.properties
130 path: rule-data-dictionary.properties
Geora Barsky4b328b82018-08-01 12:02:33 -0400131 - key: aai-environment.properties
132 path: aai-environment.properties
133 - key: schemaIngest.properties
134 path: schemaIngest.properties
135 - key: auth_policy.json
136 path: auth_policy.json
137 - name: config-auth
138 secret:
139 secretName: {{ include "common.fullname" . }}-config-auth-secret
140 items:
141 - key: tomcat_keystore
142 path: tomcat_keystore
143 - key: client-cert-onap.p12
144 path: client-cert-onap.p12
145 - name: config-topics
146 configMap:
147 name: {{ include "common.fullname" . }}-config-topics
148 defaultMode: 0644
149 items:
150 - key: topic-poa-audit-result.properties
151 path: topic-poa-audit-result.properties
152 - key: topic-poa-rule-validation.properties
153 path: topic-poa-rule-validation.properties
Pierre Rioux303680b2018-09-12 15:58:20 -0400154 - name: rules
155 configMap:
156 name: {{ include "common.fullname" . }}-rules
157 defaultMode: 0644
158 items:
159 - key: default-rules.groovy
160 path: default-rules.groovy
Geora Barsky4b328b82018-08-01 12:02:33 -0400161 imagePullSecrets:
162 - name: "{{ include "common.namespace" . }}-docker-registry-key"