blob: 368c9d35d5792a992135d3416c02430b98e89dcc [file] [log] [blame]
Michal Banka3d487482021-02-11 10:36:47 +01001{{/*
2#============LICENSE_START========================================================
3# ================================================================================
4# Copyright (c) 2021 Nokia. All rights reserved.
efiacor65672212023-03-04 09:02:52 +00005# Modifications Copyright © 2023 Nordix Foundation.
Michal Banka3d487482021-02-11 10:36:47 +01006# ================================================================================
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18# ============LICENSE_END=========================================================
19*/}}
20
21apiVersion: apps/v1
22kind: Deployment
23metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
24spec:
25 replicas: 1
26 selector: {{- include "common.selectors" . | nindent 4 }}
27 template:
28 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
29 spec:
30 initContainers:
31 {{ include "common.readinessCheck.waitFor" . | indent 6 | trim }}
32 containers:
33 - name: {{ include "common.name" . }}
34 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
35 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
36 resources: {{ include "common.resources" . | nindent 12 }}
37 ports: {{ include "common.containerPorts" . | nindent 12 }}
38 # disable liveness probe when breakpoints set in debugger
39 # so K8s doesn't restart unresponsive container
40 {{- if eq .Values.liveness.enabled true }}
41 livenessProbe:
42 httpGet:
43 path: {{ .Values.liveness.path }}
44 port: {{ .Values.liveness.port }}
45 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
46 periodSeconds: {{ .Values.liveness.periodSeconds }}
47 {{ end }}
48 env:
efiacorf1d43f72022-11-29 08:21:35 +000049 - name: SDC_ADDRESS
efiacor65672212023-03-04 09:02:52 +000050 value: sdc-be.{{include "common.namespace" .}}:8080
efiacorf1d43f72022-11-29 08:21:35 +000051 - name: SCHEMA_MAP_PATH
52 value: {{ .Values.schemaMap.directory }}/{{ .Values.schemaMap.filename }}
efiacorf1d43f72022-11-29 08:21:35 +000053 - name: SASL_JAAS_CONFIG
efiacor65672212023-03-04 09:02:52 +000054 valueFrom:
55 secretKeyRef:
56 name: {{ include "common.name" . }}-ku
57 key: sasl.jaas.config
Michal Banka3d487482021-02-11 10:36:47 +010058 volumeMounts:
59 - name: schema-map
Michal Banka254c71b2021-03-18 13:09:19 +010060 mountPath: {{ .Values.schemaMap.directory }}
Tomasz Wrobel9df9ba22022-12-07 12:37:02 +010061 - name: app-config
62 mountPath: /app/config/
farida azmy37481802021-04-11 15:41:32 +020063 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
Michal Banka3d487482021-02-11 10:36:47 +010064 volumes:
65 - name: schema-map
66 configMap:
Michal Banka028e1c22021-05-10 11:00:39 +020067 name: {{ include "common.release" . }}-dcae-external-repo-configmap-schema-map
Michal Banka3d487482021-02-11 10:36:47 +010068 defaultMode: 0755
69 items:
70 - key: {{ .Values.schemaMap.filename }}
71 path: {{ .Values.schemaMap.filename }}
Tomasz Wrobel9df9ba22022-12-07 12:37:02 +010072 - name: app-config
73 configMap:
74 name: {{ include "common.fullname" . }}-application-config-configmap
75 defaultMode: 420
76 optional: true
Michal Banka3d487482021-02-11 10:36:47 +010077 imagePullSecrets:
Tomasz Wrobel9df9ba22022-12-07 12:37:02 +010078 - name: "{{ include "common.namespace" . }}-docker-registry-key"