Removal of zookeeper from portal HELM charts
[oom.git] / kubernetes / sdnc / charts / ueb-listener / 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
17 apiVersion: apps/v1
18 kind: Deployment
19 metadata:
20   name: {{ include "common.fullname" . }}
21   namespace: {{ include "common.namespace" . }}
22   labels:
23     app: {{ include "common.name" . }}
24     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
25     release: {{ include "common.release" . }}
26     heritage: {{ .Release.Service }}
27 spec:
28   selector:
29     matchLabels:
30       app: {{ include "common.name" . }}
31   replicas: {{ .Values.replicaCount }}
32   template:
33     metadata:
34       labels:
35         app: {{ include "common.name" . }}
36         release: {{ include "common.release" . }}
37     spec:
38       initContainers:
39       - command:
40         - sh
41         args:
42         - -c
43         - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
44         env:
45         - name: SDNC_DB_USER
46           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
47         - name: SDNC_DB_PASSWORD
48           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
49         - name: UEB_USER
50           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ueb-creds" "key" "login") | indent 10 }}
51         - name: UEB_PASSWORD
52           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ueb-creds" "key" "password") | indent 10 }}
53         - name: ODL_USER
54           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 10 }}
55         - name: ODL_PASSWORD
56           {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 10 }}
57         volumeMounts:
58         - mountPath: /config-input
59           name: config-input
60         - mountPath: /config
61           name: properties
62         image: "{{ .Values.global.envsubstImage }}"
63         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
64         name: {{ include "common.name" . }}-update-config
65       - command:
66         - /root/ready.py
67         args:
68         - --container-name
69         - {{ include "common.mariadbService" . }}
70         - --container-name
71         - {{ .Values.config.sdncChartName }}
72         - --container-name
73         - {{ .Values.config.sdcbeChartName }}
74         - --container-name
75         - {{ .Values.config.msgRouterContainerName }}
76         env:
77         - name: NAMESPACE
78           valueFrom:
79             fieldRef:
80               apiVersion: v1
81               fieldPath: metadata.namespace
82         image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
83         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
84         name: {{ include "common.name" . }}-readiness
85       containers:
86       - command:
87         - /opt/onap/sdnc/ueb-listener/bin/start-ueb-listener.sh
88         name: {{ include "common.name" . }}
89         image: "{{ include "common.repository" . }}/{{ .Values.image }}"
90         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
91         env:
92         - name: PROPERTY_DIR
93           value: "{{ .Values.config.configDir }}"
94         - name: SDNC_CONFIG_DIR
95           value: "{{ .Values.config.configDir }}"
96         volumeMounts:
97         - mountPath: /etc/localtime
98           name: localtime
99           readOnly: true
100         - mountPath: {{ .Values.config.configDir }}/dblib.properties
101           name: properties
102           subPath: dblib.properties
103         - mountPath: {{ .Values.config.configDir }}/ueb-listener.properties
104           name: properties
105           subPath: ueb-listener.properties
106         resources:
107 {{ include "common.resources" . | indent 12 }}
108         {{- if .Values.nodeSelector }}
109         nodeSelector:
110 {{ toYaml .Values.nodeSelector | indent 10 }}
111         {{- end -}}
112         {{- if .Values.affinity }}
113         affinity:
114 {{ toYaml .Values.affinity | indent 10 }}
115         {{- end }}
116
117       volumes:
118         - name: localtime
119           hostPath:
120             path: /etc/localtime
121         - name: config-input
122           configMap:
123             name: {{ include "common.fullname" . }}
124             defaultMode: 0644
125         - name: properties
126           emptyDir:
127             medium: Memory
128       imagePullSecrets:
129       - name: "{{ include "common.namespace" . }}-docker-registry-key"