Merge "[AAI] Add model-loader tracing config"
[oom.git] / kubernetes / dmaap / components / dmaap-dr-prov / templates / deployment.yaml
1 {{/*
2 # 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.
15 */}}
16 apiVersion: apps/v1
17 kind: Deployment
18 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
19 spec:
20   selector: {{- include "common.selectors" . | nindent 4 }}
21   template:
22     metadata: {{- include "common.templateMetadata" . | nindent 6 }}
23     spec:
24       {{ include "common.podSecurityContext" . | indent 6 | trim}}
25       initContainers: {{ include "common.readinessCheck.waitFor" . | nindent 6 }}
26       containers:
27         - name: {{ include "common.name" . }}
28           image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
29           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
30           ports: {{ include "common.containerPorts" . | nindent 12  }}
31           {{- if eq .Values.liveness.enabled true }}
32           livenessProbe:
33             httpGet:
34               port: {{ .Values.liveness.port }}
35               path: /internal/prov
36             initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
37             periodSeconds: {{ .Values.liveness.periodSeconds }}
38           {{ end -}}
39           readinessProbe:
40             httpGet:
41               port: {{ .Values.liveness.port }}
42               path: /internal/prov
43             initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
44             periodSeconds: {{ .Values.liveness.periodSeconds }}
45           env:
46           - name: DB_USERNAME
47             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-dr-db-user-credentials" "key" "login") | indent 12 }}
48           - name: DB_PASSWORD
49             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-dr-db-user-credentials" "key" "password") | indent 12 }}
50           volumeMounts:
51             - mountPath: /opt/app/datartr/etc/provserver.properties
52               name: {{ include "common.fullname" . }}-config
53               subPath: provserver.properties
54             - mountPath: /opt/app/datartr/etc/logback.xml
55               name: {{ include "common.fullname" . }}-log-conf
56               subPath: logback.xml
57           resources: {{ include "common.resources" . | nindent 12 }}
58         {{- if .Values.nodeSelector }}
59         nodeSelector:
60 {{ toYaml .Values.nodeSelector | indent 10 }}
61         {{- end -}}
62         {{- if .Values.affinity }}
63         affinity:
64 {{ toYaml .Values.affinity | indent 10 }}
65         {{- end }}
66       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
67       volumes:
68       - name: {{ include "common.fullname" . }}-config
69         configMap:
70           name: {{ include "common.fullname" . }}-configmap
71           items:
72           - key: provserver.properties
73             path: provserver.properties
74       - name: {{ include "common.fullname" . }}-log-conf
75         configMap:
76           name: {{ include "common.fullname" . }}-log
77       {{- include "common.imagePullSecrets" . | nindent 6 }}