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 {{ include "common.podSecurityContext" . | indent 6 | trim}}
27 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 8 }}
28 - name: {{ include "common.name" . }}-readiness
32 image: {{ include "repositoryGenerator.image.readiness" . }}
33 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
44 fieldPath: metadata.namespace
45 - name: {{ include "common.name" . }}-permission-fixer
48 image: {{ include "repositoryGenerator.image.busybox" . }}
49 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
50 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
51 - mountPath: {{ .Values.persistence.spool.path }}
52 name: {{ include "common.fullname" . }}-spool
53 - mountPath: {{ .Values.persistence.event.path }}
54 name: {{ include "common.fullname" . }}-event-logs
55 command: ["chown","-Rf","1000:1001", "/opt/app/"]
57 - name: {{ include "common.name" . }}
58 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
59 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
60 ports: {{ include "common.containerPorts" . | nindent 12 }}
61 {{- if eq .Values.liveness.enabled true }}
64 port: {{.Values.liveness.port}}
65 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
66 periodSeconds: {{ .Values.liveness.periodSeconds }}
70 port: {{.Values.readiness.port}}
71 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
72 periodSeconds: {{ .Values.readiness.periodSeconds }}
73 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
74 - mountPath: {{ .Values.persistence.spool.path }}
75 name: {{ include "common.fullname" . }}-spool
76 - mountPath: {{ .Values.persistence.event.path }}
77 name: {{ include "common.fullname" . }}-event-logs
78 - mountPath: /etc/localtime
81 - mountPath: /opt/app/datartr/etc/node.properties
82 name: {{ include "common.fullname" . }}-config
83 subPath: node.properties
84 - mountPath: /opt/app/datartr/etc/logback.xml
85 name: {{ include "common.fullname" . }}-log-conf
87 - mountPath: {{ .Values.global.loggingDirectory }}
89 resources: {{ include "common.resources" . | nindent 12 }}
90 {{- if .Values.nodeSelector }}
91 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
93 {{- if .Values.affinity }}
94 affinity: {{ toYaml .Values.affinity | nindent 10 }}
96 # Filebeat sidecar container
97 {{ include "common.log.sidecar" . | nindent 8 }}
99 - name: "{{ include "common.namespace" . }}-docker-registry-key"
100 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
101 volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
105 - name: {{ include "common.fullname" . }}-config
107 name: {{ include "common.fullname" . }}-configmap
109 - key: node.properties
110 path: node.properties
111 - name: {{ include "common.fullname" . }}-log-conf
113 name: {{ include "common.fullname" . }}-log
114 {{ include "common.log.volumes" . | nindent 8 }}
117 {{- if not .Values.persistence.enabled }}
118 - name: {{ include "common.fullname" . }}-event-logs
120 - name: {{ include "common.fullname" . }}-spool
123 {{- if .Values.persistence.enabled }}
124 volumeClaimTemplates:
125 - {{ include "common.PVCTemplate" (dict "dot" . "suffix" "spool" "persistenceInfos" .Values.persistence.spool) | indent 4 | trim }}
126 - {{ include "common.PVCTemplate" (dict "dot" . "suffix" "event-logs" "persistenceInfos" .Values.persistence.event) | indent 4 | trim }}