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.
16 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
18 selector: {{- include "common.selectors" . | nindent 4 }}
19 serviceName: {{ include "common.servicename" . }}
20 replicas: {{ .Values.replicaCount }}
22 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
25 - name: {{ include "common.name" . }}-readiness
26 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
27 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
38 fieldPath: metadata.namespace
39 {{- if .Values.global.aafEnabled }}{{ include "common.aaf-config" . | nindent 8 }}{{ end }}
40 - name: {{ include "common.name" . }}-permission-fixer
41 image: "{{ .Values.global.busyBoxRepository }}/{{ .Values.global.busyBoxImage }}"
42 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
43 volumeMounts: {{- if .Values.global.aafEnabled }}{{ include "common.aaf-config-volume-mountpath" . | nindent 10 }}{{ end }}
44 - mountPath: {{ .Values.persistence.spool.path }}
45 name: {{ include "common.fullname" . }}-spool
46 - mountPath: {{ .Values.persistence.event.path }}
47 name: {{ include "common.fullname" . }}-event-logs
48 command: ["chown","-Rf","1000:1001", "/opt/app/"]
50 - name: {{ include "common.name" . }}
51 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
52 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
53 ports: {{ include "common.containerPorts" . | nindent 12 }}
54 {{- if eq .Values.liveness.enabled true }}
57 port: {{.Values.liveness.port}}
58 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
59 periodSeconds: {{ .Values.liveness.periodSeconds }}
63 port: {{.Values.readiness.port}}
64 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
65 periodSeconds: {{ .Values.readiness.periodSeconds }}
66 volumeMounts: {{- if .Values.global.aafEnabled }}{{ include "common.aaf-config-volume-mountpath" . | nindent 10 }}{{ end }}
67 - mountPath: {{ .Values.persistence.spool.path }}
68 name: {{ include "common.fullname" . }}-spool
69 - mountPath: {{ .Values.persistence.event.path }}
70 name: {{ include "common.fullname" . }}-event-logs
71 - mountPath: /etc/localtime
74 - mountPath: /opt/app/datartr/etc/node.properties
75 name: {{ include "common.fullname" . }}-config
76 subPath: node.properties
77 - mountPath: /opt/app/datartr/etc/logback.xml
78 name: {{ include "common.fullname" . }}-log-conf
80 - mountPath: {{ .Values.global.loggingDirectory }}
81 name: {{ include "common.fullname" . }}-logs
82 resources: {{ include "common.resources" . | nindent 12 }}
83 {{- if .Values.nodeSelector }}
84 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
86 {{- if .Values.affinity }}
87 affinity: {{ toYaml .Values.affinity | nindent 10 }}
89 # Filebeat sidecar container
90 - name: {{ include "common.name" . }}-filebeat-onap
91 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
92 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
94 - name: {{ include "common.fullname" . }}-filebeat-conf
95 mountPath: /usr/share/filebeat/filebeat.yml
97 - name: {{ include "common.fullname" . }}-data-filebeat
98 mountPath: /usr/share/filebeat/data
99 - name: {{ include "common.fullname" . }}-logs
100 mountPath: /var/log/onap/datarouter-node
102 - name: "{{ include "common.namespace" . }}-docker-registry-key"
103 volumes: {{ include "common.aaf-config-volumes" . | nindent 8 }}
107 - name: {{ include "common.fullname" . }}-config
109 name: {{ include "common.fullname" . }}-configmap
111 - key: node.properties
112 path: node.properties
113 - name: {{ include "common.fullname" . }}-log-conf
115 name: {{ include "common.fullname" . }}-log
116 - name: {{ include "common.fullname" . }}-filebeat-conf
118 name: {{ include "common.fullname" . }}-dmaap-dr-node-filebeat-configmap
119 - name: {{ include "common.fullname" . }}-data-filebeat
121 - name: {{ include "common.fullname" . }}-logs
123 {{- if not .Values.persistence.enabled }}
124 - name: {{ include "common.fullname" . }}-event-logs
126 - name: {{ include "common.fullname" . }}-spool
129 {{- if .Values.persistence.enabled }}
130 volumeClaimTemplates:
131 - {{ include "common.PVCTemplate" (dict "dot" . "suffix" "spool" "persistenceInfos" .Values.persistence.spool) | indent 4 | trim }}
132 - {{ include "common.PVCTemplate" (dict "dot" . "suffix" "event-logs" "persistenceInfos" .Values.persistence.event) | indent 4 | trim }}