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.readinessCheck.waitFor" . | nindent 8 }}
28 - name: {{ include "common.name" . }}-permission-fixer
31 image: {{ include "repositoryGenerator.image.busybox" . }}
32 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
33 command: ["chown","-Rf","1000:1001", "/opt/app/"]
35 - name: {{ include "common.fullname" . }}-spool
36 mountPath: {{ .Values.persistence.spool.path }}
37 - name: {{ include "common.fullname" . }}-event-logs
38 mountPath: {{ .Values.persistence.event.path }}
40 - name: {{ include "common.name" . }}
41 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
42 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
43 ports: {{ include "common.containerPorts" . | nindent 12 }}
44 {{- if eq .Values.liveness.enabled true }}
47 port: {{.Values.liveness.port}}
48 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
49 periodSeconds: {{ .Values.liveness.periodSeconds }}
53 port: {{.Values.readiness.port}}
54 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
55 periodSeconds: {{ .Values.readiness.periodSeconds }}
57 - mountPath: {{ .Values.persistence.spool.path }}
58 name: {{ include "common.fullname" . }}-spool
59 - mountPath: {{ .Values.persistence.event.path }}
60 name: {{ include "common.fullname" . }}-event-logs
61 - mountPath: /etc/localtime
64 - mountPath: /opt/app/datartr/etc/node.properties
65 name: {{ include "common.fullname" . }}-config
66 subPath: node.properties
67 - mountPath: /opt/app/datartr/etc/logback.xml
68 name: {{ include "common.fullname" . }}-log-conf
71 {{ include "common.resources" . }}
72 {{- if .Values.nodeSelector }}
73 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 10 }}
75 {{- if .Values.affinity }}
76 affinity: {{ toYaml .Values.affinity | nindent 10 }}
79 - name: "{{ include "common.namespace" . }}-docker-registry-key"
80 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
85 - name: {{ include "common.fullname" . }}-config
87 name: {{ include "common.fullname" . }}-node-props
89 - key: node.properties
91 - name: {{ include "common.fullname" . }}-log-conf
93 name: {{ include "common.fullname" . }}-log
94 {{- if not .Values.persistence.enabled }}
95 - name: {{ include "common.fullname" . }}-event-logs
97 - name: {{ include "common.fullname" . }}-spool
100 {{- if .Values.persistence.enabled }}
101 volumeClaimTemplates:
102 - {{ include "common.PVCTemplate" (dict "dot" . "suffix" "spool" "persistenceInfos" .Values.persistence.spool) | indent 4 | trim }}
103 - {{ include "common.PVCTemplate" (dict "dot" . "suffix" "event-logs" "persistenceInfos" .Values.persistence.event) | indent 4 | trim }}