1 # Copyright © 2017 Amdocs, Bell Canada
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
14 apiVersion: apps/v1beta1
17 name: {{ include "common.fullname" . }}
18 namespace: {{ include "common.namespace" . }}
20 app: {{ include "common.name" . }}
21 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
22 release: {{ .Release.Name }}
23 heritage: {{ .Release.Service }}
25 replicas: {{ .Values.replicaCount }}
26 serviceName: {{ .Values.config.dmaapDrNode.name }}
30 app: {{ include "common.name" . }}
31 release: {{ .Release.Name }}
34 - name: {{ include "common.name" . }}-readiness
35 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
36 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
47 fieldPath: metadata.namespace
48 {{- if .Values.global.aafEnabled }}
49 - name: {{ include "common.name" . }}-dr-node-aaf-config
50 image: "{{ include "common.repository" . }}/{{ .Values.global.aafAgentImage }}"
51 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
53 - mountPath: {{ .Values.persistence.aafCredsPath }}
54 name: {{ include "common.fullname" . }}-aaf-props
55 command: ["bash","-c","exec /opt/app/aaf_config/bin/agent.sh"]
58 value: "{{ .Values.aafConfig.fqi }}"
59 - name: aaf_locate_url
60 value: "https://aaf-locate.{{ .Release.Namespace }}:8095"
61 - name: aaf_locator_container
62 value: "{{ .Values.global.aafLocatorContainer }}"
63 - name: aaf_locator_container_ns
64 value: "{{ .Release.Namespace }}"
65 - name: aaf_locator_fqdn
66 value: "{{ .Values.aafConfig.fqdn }}"
67 - name: aaf_locator_public_fqdn
68 value: "{{.Values.aafConfig.publicFqdn}}"
69 - name: aaf_locator_app_ns
70 value: "{{ .Values.global.aafAppNs }}"
72 value: "{{ .Values.aafConfig.aafDeployFqi }}"
73 - name: DEPLOY_PASSWORD
74 value: "{{ .Values.aafConfig.aafDeployPass }}"
75 - name: cadi_longitude
76 value: "{{ .Values.aafConfig.cadiLongitude }}"
78 value: "{{ .Values.aafConfig.cadiLatitude }}"
80 - name: {{ include "common.name" . }}-permission-fixer
81 image: "{{ .Values.global.busyBoxRepository }}/{{ .Values.global.busyBoxImage }}"
82 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
84 - mountPath: {{ .Values.persistence.spoolPath }}
85 name: {{ include "common.fullname" . }}-data
86 - mountPath: {{ .Values.persistence.eventLogsPath }}
87 name: {{ include "common.fullname" . }}-event-logs
88 {{- if .Values.global.aafEnabled }}
89 - mountPath: {{ .Values.persistence.aafCredsPath }}
90 name: {{ include "common.fullname" . }}-aaf-props
92 command: ["chown","-Rf","1000:1001", "/opt/app/"]
94 - name: {{ include "common.name" . }}
95 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
96 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
98 - containerPort: {{.Values.config.dmaapDrNode.externalPort}}
99 - containerPort: {{.Values.config.dmaapDrNode.externalPort2}}
100 {{- if eq .Values.liveness.enabled true }}
103 port: {{.Values.config.dmaapDrNode.internalPort}}
104 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
105 periodSeconds: {{ .Values.liveness.periodSeconds }}
109 port: {{.Values.config.dmaapDrNode.internalPort}}
110 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
111 periodSeconds: {{ .Values.readiness.periodSeconds }}
113 {{- if .Values.global.aafEnabled }}
114 - mountPath: {{ .Values.persistence.aafCredsPath }}
115 name: {{ include "common.fullname" . }}-aaf-props
117 - mountPath: {{ .Values.persistence.spoolPath }}
118 name: {{ include "common.fullname" . }}-data
119 - mountPath: {{ .Values.persistence.eventLogsPath }}
120 name: {{ include "common.fullname" . }}-event-logs
121 - mountPath: /etc/localtime
124 - mountPath: /opt/app/datartr/etc/node.properties
125 name: {{ include "common.fullname" . }}-config
126 subPath: node.properties
127 - mountPath: /opt/app/datartr/etc/logback.xml
128 name: {{ include "common.fullname" . }}-log-conf
130 - mountPath: {{ .Values.global.loggingDirectory }}
131 name: {{ include "common.fullname" . }}-logs
133 {{ include "common.resources" . }}
134 {{- if .Values.nodeSelector }}
136 {{ toYaml .Values.nodeSelector | indent 10 }}
138 {{- if .Values.affinity }}
140 {{ toYaml .Values.affinity | indent 10 }}
142 # Filebeat sidecar container
143 - name: {{ include "common.name" . }}-filebeat-onap
144 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
145 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
147 - name: {{ include "common.fullname" . }}-filebeat-conf
148 mountPath: /usr/share/filebeat/filebeat.yml
149 subPath: filebeat.yml
150 - name: {{ include "common.fullname" . }}-data-filebeat
151 mountPath: /usr/share/filebeat/data
152 - name: {{ include "common.fullname" . }}-logs
153 mountPath: /var/log/onap/datarouter-node
155 - name: "{{ include "common.namespace" . }}-docker-registry-key"
160 - name: {{ include "common.fullname" . }}-config
162 name: {{ include "common.fullname" . }}-configmap
164 - key: node.properties
165 path: node.properties
166 - name: {{ include "common.fullname" . }}-log-conf
168 name: {{ include "common.fullname" . }}-log
169 - name: {{ include "common.fullname" . }}-filebeat-conf
171 name: {{ include "common.fullname" . }}-dmaap-dr-node-filebeat-configmap
172 - name: {{ include "common.fullname" . }}-data-filebeat
174 - name: {{ include "common.fullname" . }}-logs
176 {{- if not .Values.persistence.enabled }}
177 - name: {{ include "common.fullname" . }}-event-logs-pvc
179 - name: {{ include "common.fullname" . }}-data
181 {{- if .Values.global.aafEnabled }}
182 - name: {{ include "common.fullname" . }}-aaf-props-pvc
186 {{- if .Values.persistence.enabled }}
187 volumeClaimTemplates:
189 name: {{ include "common.fullname" . }}-data
191 name: {{ include "common.fullname" . }}
194 - {{ .Values.persistence.accessMode }}
195 storageClassName: {{ include "common.storageClass" . }}
198 storage: {{ .Values.persistence.spoolSize }}
200 name: {{ include "common.fullname" . }}-event-logs
202 name: {{ include "common.fullname" . }}
205 - {{ .Values.persistence.accessMode }}
206 {{- if eq "True" (include "common.needPV" .) }}
207 storageClassName: "{{ include "common.fullname" . }}-data-event-logs"
209 storageClassName: {{ include "common.storageClass" . }}
213 storage: {{ .Values.persistence.eventLogSize }}
214 {{- if .Values.global.aafEnabled }}
216 name: {{ include "common.fullname" . }}-aaf-props
218 name: {{ include "common.fullname" . }}
221 - {{ .Values.persistence.accessMode }}
222 {{- if eq "True" (include "common.needPV" .) }}
223 storageClassName: "{{ include "common.fullname" . }}-data-aaf-props"
225 storageClassName: {{ include "common.storageClass" . }}
229 storage: {{ .Values.persistence.aafCredsSize }}