blob: 6435b0a64157fe17796a871cfbd35d2d8975e2f8 [file] [log] [blame]
Fiachra Corcoranbe966552018-08-07 16:58:45 +01001# Copyright © 2017 Amdocs, Bell Canada
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14apiVersion: extensions/v1beta1
15kind: Deployment
16metadata:
17 name: {{ include "common.fullname" . }}
18 namespace: {{ include "common.namespace" . }}
19 labels:
20 app: {{ include "common.name" . }}
21 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010022 release: {{ include "common.release" . }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +010023 heritage: {{ .Release.Service }}
24spec:
25 replicas: {{ .Values.replicaCount }}
26 template:
27 metadata:
28 labels:
29 app: {{ include "common.name" . }}
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +010030 release: {{ include "common.release" . }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +010031 spec:
efiacor7b9a0872019-08-28 21:20:22 +000032 hostname: {{ .Values.global.dmaapDrProvName }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +010033 initContainers:
efiacore62958b2019-09-27 16:54:36 +010034 - name: {{ include "common.name" . }}-readiness
35 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
36 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
37 command:
38 - /root/ready.py
39 args:
40 - --container-name
41 - {{ .Values.config.dmaapDrDb.mariadbContName }}
42 env:
43 - name: NAMESPACE
44 valueFrom:
45 fieldRef:
46 apiVersion: v1
47 fieldPath: metadata.namespace
48 {{- if .Values.global.aafEnabled }}
Sylvain Desbureauxd3984822019-12-27 11:06:14 +010049 - name: {{ include "common.name" . }}-aaf-readiness
50 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
51 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
52 command:
53 - /root/ready.py
54 args:
55 - --container-name
56 - aaf-locate
efiacora03527b2020-02-07 19:02:15 +000057 - --container-name
58 - aaf-cm
Sylvain Desbureauxd3984822019-12-27 11:06:14 +010059 env:
60 - name: NAMESPACE
61 valueFrom:
62 fieldRef:
63 apiVersion: v1
64 fieldPath: metadata.namespace
efiacore62958b2019-09-27 16:54:36 +010065 - name: {{ include "common.name" . }}-dr-prov-aaf-config
66 image: "{{ include "common.repository" . }}/{{ .Values.global.aafAgentImage }}"
67 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
68 command: ["bash","-c","exec /opt/app/aaf_config/bin/agent.sh"]
69 volumeMounts:
70 - mountPath: {{ .Values.persistence.aafCredsPath }}
71 name: {{ include "common.fullname" . }}-aaf-config-vol
72 env:
73 - name: APP_FQI
74 value: "{{ .Values.aafConfig.fqi }}"
75 - name: aaf_locate_url
76 value: "https://aaf-locate.{{ .Release.Namespace }}:8095"
77 - name: aaf_locator_container
78 value: "{{ .Values.global.aafLocatorContainer }}"
79 - name: aaf_locator_container_ns
80 value: "{{ .Release.Namespace }}"
81 - name: aaf_locator_fqdn
82 value: "{{ .Values.aafConfig.fqdn }}"
83 - name: aaf_locator_public_fqdn
84 value: "{{.Values.aafConfig.publicFqdn}}"
85 - name: aaf_locator_app_ns
86 value: "{{ .Values.global.aafAppNs }}"
87 - name: DEPLOY_FQI
88 value: "{{ .Values.aafConfig.aafDeployFqi }}"
89 - name: DEPLOY_PASSWORD
90 value: "{{ .Values.aafConfig.aafDeployPass }}"
91 - name: cadi_longitude
92 value: "{{ .Values.aafConfig.cadiLongitude }}"
93 - name: cadi_latitude
94 value: "{{ .Values.aafConfig.cadiLatitude }}"
95 - name: {{ include "common.name" . }}-permission-fixer
96 image: "{{ .Values.global.busyBoxRepository }}/{{ .Values.global.busyBoxImage }}"
97 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
98 volumeMounts:
99 - mountPath: {{ .Values.persistence.aafCredsPath }}
100 name: {{ include "common.fullname" . }}-aaf-config-vol
101 command: ["chown","-Rf","1000:1001", "/opt/app/"]
102 {{ end }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +0100103 containers:
104 - name: {{ include "common.name" . }}
105 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
106 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
107 ports:
efiacor18e43fd2019-10-03 19:57:52 +0100108 - containerPort: {{ .Values.config.dmaapDrProv.internalPort }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +0100109 {{- if eq .Values.liveness.enabled true }}
110 livenessProbe:
111 tcpSocket:
efiacor18e43fd2019-10-03 19:57:52 +0100112 port: {{ .Values.config.dmaapDrProv.internalPort }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +0100113 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
114 periodSeconds: {{ .Values.liveness.periodSeconds }}
115 {{ end -}}
116 readinessProbe:
117 tcpSocket:
efiacor18e43fd2019-10-03 19:57:52 +0100118 port: {{ .Values.config.dmaapDrProv.internalPort }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +0100119 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
120 periodSeconds: {{ .Values.readiness.periodSeconds }}
121 volumeMounts:
efiacore62958b2019-09-27 16:54:36 +0100122 {{- if .Values.global.aafEnabled }}
123 - mountPath: {{ .Values.persistence.aafCredsPath }}
124 name: {{ include "common.fullname" . }}-aaf-config-vol
125 {{- end }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +0100126 - mountPath: /etc/localtime
127 name: localtime
128 readOnly: false
129 - mountPath: /opt/app/datartr/etc/provserver.properties
efiacoreabb6522019-04-08 09:46:09 +0000130 name: {{ include "common.fullname" . }}-config
Fiachra Corcoranbe966552018-08-07 16:58:45 +0100131 subPath: provserver.properties
efiacor7b9a0872019-08-28 21:20:22 +0000132 - mountPath: /opt/app/datartr/etc/logback.xml
133 name: {{ include "common.fullname" . }}-log-conf
134 subPath: logback.xml
efiacoreabb6522019-04-08 09:46:09 +0000135 - mountPath: {{ .Values.global.loggingDirectory }}
136 name: {{ include "common.fullname" . }}-logs
Fiachra Corcoranbe966552018-08-07 16:58:45 +0100137 resources:
efiacore62958b2019-09-27 16:54:36 +0100138{{ include "common.resources" . }}
Fiachra Corcoranbe966552018-08-07 16:58:45 +0100139 {{- if .Values.nodeSelector }}
140 nodeSelector:
141{{ toYaml .Values.nodeSelector | indent 10 }}
142 {{- end -}}
143 {{- if .Values.affinity }}
144 affinity:
145{{ toYaml .Values.affinity | indent 10 }}
efiacore62958b2019-09-27 16:54:36 +0100146 {{- end -}}
147 # Filebeat sidecar container
EmmettCox6065d3e2019-04-12 09:45:30 +0000148 - name: {{ include "common.name" . }}-filebeat-onap
econwar378cf192019-01-08 16:19:59 +0000149 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
150 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
151 volumeMounts:
152 - name: {{ include "common.fullname" . }}-filebeat-conf
153 mountPath: /usr/share/filebeat/filebeat.yml
154 subPath: filebeat.yml
155 - name: {{ include "common.fullname" . }}-data-filebeat
156 mountPath: /usr/share/filebeat/data
157 - name: {{ include "common.fullname" . }}-logs
158 mountPath: /var/log/onap/datarouter-prov
Fiachra Corcoranbe966552018-08-07 16:58:45 +0100159 volumes:
160 - name: localtime
161 hostPath:
162 path: /etc/localtime
efiacoreabb6522019-04-08 09:46:09 +0000163 - name: {{ include "common.fullname" . }}-config
Fiachra Corcoranbe966552018-08-07 16:58:45 +0100164 configMap:
efiacoreabb6522019-04-08 09:46:09 +0000165 name: {{ include "common.fullname" . }}-configmap
166 items:
167 - key: provserver.properties
168 path: provserver.properties
econwar378cf192019-01-08 16:19:59 +0000169 - name: {{ include "common.fullname" . }}-log-conf
170 configMap:
171 name: {{ include "common.fullname" . }}-log
172 - name: {{ include "common.fullname" . }}-filebeat-conf
173 configMap:
efiacor7b9a0872019-08-28 21:20:22 +0000174 name: {{ include "common.fullname" . }}-dmaap-dr-prov-filebeat-configmap
econwar378cf192019-01-08 16:19:59 +0000175 - name: {{ include "common.fullname" . }}-data-filebeat
176 emptyDir: {}
177 - name: {{ include "common.fullname" . }}-logs
178 emptyDir: {}
efiacore62958b2019-09-27 16:54:36 +0100179 {{- if .Values.global.aafEnabled }}
180 - name: {{ include "common.fullname" . }}-aaf-config-vol
Sylvain Desbureaux60141122019-11-29 15:55:11 +0100181 {{- if .Values.persistence.enabled }}
efiacore62958b2019-09-27 16:54:36 +0100182 persistentVolumeClaim:
183 claimName: {{ include "common.fullname" . }}-aaf-props
Sylvain Desbureaux60141122019-11-29 15:55:11 +0100184 {{- else }}
185 emptyDir: {}
186 {{- end }}
187 {{- end }}
Sylvain Desbureaux435ef532018-12-20 10:58:09 +0100188 imagePullSecrets:
189 - name: "{{ include "common.namespace" . }}-docker-registry-key"