2 # Copyright © 2017 Amdocs, Bell Canada
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
18 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
20 selector: {{- include "common.selectors" . | nindent 4 }}
21 serviceName: {{ include "common.servicename" . }}
22 replicas: {{ .Values.replicaCount }}
24 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
26 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 8 }}
27 - name: {{ include "common.name" . }}-readiness
28 image: {{ include "repositoryGenerator.image.readiness" . }}
29 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
40 fieldPath: metadata.namespace
41 - name: {{ include "common.name" . }}-permission-fixer
42 image: {{ include "repositoryGenerator.image.busybox" . }}
43 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
44 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
45 - mountPath: {{ .Values.persistence.spool.path }}
46 name: {{ include "common.fullname" . }}-spool
47 - mountPath: {{ .Values.persistence.event.path }}
48 name: {{ include "common.fullname" . }}-event-logs
49 command: ["chown","-Rf","1000:1001", "/opt/app/"]
51 - name: {{ include "common.name" . }}
52 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
53 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
54 ports: {{ include "common.containerPorts" . | nindent 12 }}
55 {{- if eq .Values.liveness.enabled true }}
58 port: {{.Values.liveness.port}}
59 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
60 periodSeconds: {{ .Values.liveness.periodSeconds }}
64 port: {{.Values.readiness.port}}
65 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
66 periodSeconds: {{ .Values.readiness.periodSeconds }}
67 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
68 - mountPath: {{ .Values.persistence.spool.path }}
69 name: {{ include "common.fullname" . }}-spool
70 - mountPath: {{ .Values.persistence.event.path }}
71 name: {{ include "common.fullname" . }}-event-logs
72 - mountPath: /etc/localtime
75 - mountPath: /opt/app/datartr/etc/node.properties
76 name: {{ include "common.fullname" . }}-config
77 subPath: node.properties
78 - mountPath: /opt/app/datartr/etc/logback.xml
79 name: {{ include "common.fullname" . }}-log-conf
81 - mountPath: {{ .Values.global.loggingDirectory }}
82 name: {{ include "common.fullname" . }}-logs
83 resources: {{ include "common.resources" . | nindent 12 }}
84 {{- if .Values.nodeSelector }}
85 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
87 {{- if .Values.affinity }}
88 affinity: {{ toYaml .Values.affinity | nindent 10 }}
90 # Filebeat sidecar container
91 - name: {{ include "common.name" . }}-filebeat-onap
92 image: {{ include "repositoryGenerator.image.logging" . }}
93 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
95 - name: {{ include "common.fullname" . }}-filebeat-conf
96 mountPath: /usr/share/filebeat/filebeat.yml
98 - name: {{ include "common.fullname" . }}-data-filebeat
99 mountPath: /usr/share/filebeat/data
100 - name: {{ include "common.fullname" . }}-logs
101 mountPath: /var/log/onap/datarouter-node
103 - name: "{{ include "common.namespace" . }}-docker-registry-key"
104 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
105 volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
109 - name: {{ include "common.fullname" . }}-config
111 name: {{ include "common.fullname" . }}-configmap
113 - key: node.properties
114 path: node.properties
115 - name: {{ include "common.fullname" . }}-log-conf
117 name: {{ include "common.fullname" . }}-log
118 - name: {{ include "common.fullname" . }}-filebeat-conf
120 name: {{ include "common.fullname" . }}-dmaap-dr-node-filebeat-configmap
121 - name: {{ include "common.fullname" . }}-data-filebeat
123 - name: {{ include "common.fullname" . }}-logs
125 {{- if not .Values.persistence.enabled }}
126 - name: {{ include "common.fullname" . }}-event-logs
128 - name: {{ include "common.fullname" . }}-spool
131 {{- if .Values.persistence.enabled }}
132 volumeClaimTemplates:
133 - {{ include "common.PVCTemplate" (dict "dot" . "suffix" "spool" "persistenceInfos" .Values.persistence.spool) | indent 4 | trim }}
134 - {{ include "common.PVCTemplate" (dict "dot" . "suffix" "event-logs" "persistenceInfos" .Values.persistence.event) | indent 4 | trim }}