2 # Copyright (C) 2021 Pantheon.tech, Orange
3 # Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
20 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
22 replicas: {{ .Values.replicaCount }}
23 selector: {{- include "common.selectors" . | nindent 4 }}
25 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
27 {{ include "common.podSecurityContext" . | indent 6 | trim}}
28 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . ) }}
29 initContainers: {{ include "common.readinessCheck.waitFor" . | nindent 6 }}
30 - name: {{ include "common.name" . }}-update-config
31 image: {{ include "repositoryGenerator.image.envsubst" . }}
32 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
37 - "cd /config-input && for PFILE in `find . -not -type d | grep -v -F ..`; do envsubst <${PFILE} >/config/${PFILE}; done"
40 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "login") | indent 12 }}
42 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "pg-user-creds" "key" "password") | indent 12 }}
44 - mountPath: /config-input
49 - name: {{ include "common.name" . }}
50 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
51 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
52 ports: {{ include "common.containerPorts" . | nindent 10 }}
53 {{ include "common.containerSecurityContext" . | indent 8 | trim }}
54 # disable liveness probe when breakpoints set in debugger
55 # so K8s doesn't restart unresponsive container
56 {{- if eq .Values.liveness.enabled true }}
59 port: {{ .Values.liveness.port }}
60 path: {{ .Values.liveness.path }}
61 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
62 periodSeconds: {{ .Values.liveness.periodSeconds }}
66 port: {{ .Values.readiness.port }}
67 path: {{ .Values.readiness.path }}
68 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
69 periodSeconds: {{ .Values.readiness.periodSeconds }}
70 resources: {{ include "common.resources" . | nindent 10 }}
71 {{- if .Values.nodeSelector }}
72 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 12 }}
74 {{- if .Values.affinity }}
75 affinity: {{ toYaml .Values.affinity | nindent 12 }}
78 - mountPath: /app/resources/application.yml
79 subPath: application.yml
81 - mountPath: /app/resources/logback.xml
87 - name: init-data-input
89 name: {{ include "common.fullname" . }}
96 - name: "{{ include "common.namespace" . }}-docker-registry-key"