2 # ============LICENSE_START=======================================================
3 # Copyright (C) 2021 Nordix Foundation
4 # ================================================================================
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.
17 # SPDX-License-Identifier: Apache-2.0
18 # ============LICENSE_END=========================================================
23 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
25 replicas: {{ .Values.replicaCount }}
26 minReadySeconds: {{ index .Values.minReadySeconds }}
28 type: {{ index .Values.updateStrategy.type }}
30 maxUnavailable: {{ index .Values.updateStrategy.maxUnavailable }}
31 maxSurge: {{ index .Values.updateStrategy.maxSurge }}
32 selector: {{- include "common.selectors" . | nindent 4 }}
36 app.kubernetes.io/name: {{ include "common.name" . }}
37 app.kubernetes.io/instance: {{ include "common.release" . }}
39 {{ include "common.podSecurityContext" . | indent 6 | trim}}
40 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . ) }}
41 initContainers: {{ include "common.readinessCheck.waitFor" . | nindent 6 }}
42 - name: {{ include "common.name" . }}-update-config
43 image: {{ include "repositoryGenerator.image.envsubst" . }}
44 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
49 - "cd /config-input && for PFILE in `find . -not -type d | grep -v -F ..`; do envsubst <${PFILE} >/config/${PFILE}; done"
51 - name: DMI_PLUGIN_USERNAME
52 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "app-user-creds" "key" "login") | indent 12 }}
53 - name: DMI_PLUGIN_PASSWORD
54 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "app-user-creds" "key" "password") | indent 12 }}
56 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "sdnc-creds" "key" "login") | indent 12 }}
58 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "sdnc-creds" "key" "password") | indent 12 }}
59 - name: CPS_CORE_USERNAME
60 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cps-core-creds" "key" "login") | indent 12 }}
61 - name: CPS_CORE_PASSWORD
62 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cps-core-creds" "key" "password") | indent 12 }}
64 - mountPath: /config-input
69 - name: {{ include "common.name" . }}
70 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
71 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
72 ports: {{ include "common.containerPorts" . | nindent 10 }}
73 {{ include "common.containerSecurityContext" . | indent 8 | trim }}
74 # disable liveness probe when breakpoints set in debugger
75 # so K8s doesn't restart unresponsive container
76 {{- if eq .Values.liveness.enabled true }}
79 port: {{ .Values.liveness.port }}
80 path: {{ .Values.liveness.path }}
81 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
82 periodSeconds: {{ .Values.liveness.periodSeconds }}
86 port: {{ .Values.readiness.port }}
87 path: {{ .Values.readiness.path }}
88 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
89 periodSeconds: {{ .Values.readiness.periodSeconds }}
91 - name: SPRING_PROFILES_ACTIVE
92 value: {{ .Values.config.spring.profile }}
93 resources: {{ include "common.resources" . | nindent 10 }}
94 {{- if .Values.nodeSelector }}
95 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 12 }}
97 {{- if .Values.affinity }}
98 affinity: {{ toYaml .Values.affinity | nindent 12 }}
101 - mountPath: /app/resources/application-helm.yml
102 subPath: application-helm.yml
107 - name: init-data-input
109 name: {{ include "common.fullname" . }}
116 - name: "{{ include "common.namespace" . }}-docker-registry-key"