Michal Banka | 3d48748 | 2021-02-11 10:36:47 +0100 | [diff] [blame] | 1 | {{/* |
| 2 | #============LICENSE_START======================================================== |
| 3 | # ================================================================================ |
| 4 | # Copyright (c) 2021 Nokia. All rights reserved. |
efiacor | 6567221 | 2023-03-04 09:02:52 +0000 | [diff] [blame] | 5 | # Modifications Copyright © 2023 Nordix Foundation. |
Michal Banka | 3d48748 | 2021-02-11 10:36:47 +0100 | [diff] [blame] | 6 | # ================================================================================ |
| 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 | |
| 21 | apiVersion: apps/v1 |
| 22 | kind: Deployment |
| 23 | metadata: {{- include "common.resourceMetadata" . | nindent 2 }} |
| 24 | spec: |
| 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: |
efiacor | f1d43f7 | 2022-11-29 08:21:35 +0000 | [diff] [blame] | 49 | - name: SDC_ADDRESS |
efiacor | 6567221 | 2023-03-04 09:02:52 +0000 | [diff] [blame] | 50 | value: sdc-be.{{include "common.namespace" .}}:8080 |
efiacor | f1d43f7 | 2022-11-29 08:21:35 +0000 | [diff] [blame] | 51 | - name: SCHEMA_MAP_PATH |
| 52 | value: {{ .Values.schemaMap.directory }}/{{ .Values.schemaMap.filename }} |
efiacor | f1d43f7 | 2022-11-29 08:21:35 +0000 | [diff] [blame] | 53 | - name: SASL_JAAS_CONFIG |
efiacor | 6567221 | 2023-03-04 09:02:52 +0000 | [diff] [blame] | 54 | valueFrom: |
| 55 | secretKeyRef: |
| 56 | name: {{ include "common.name" . }}-ku |
| 57 | key: sasl.jaas.config |
Michal Banka | 3d48748 | 2021-02-11 10:36:47 +0100 | [diff] [blame] | 58 | volumeMounts: |
| 59 | - name: schema-map |
Michal Banka | 254c71b | 2021-03-18 13:09:19 +0100 | [diff] [blame] | 60 | mountPath: {{ .Values.schemaMap.directory }} |
Tomasz Wrobel | 9df9ba2 | 2022-12-07 12:37:02 +0100 | [diff] [blame] | 61 | - name: app-config |
| 62 | mountPath: /app/config/ |
farida azmy | 3748180 | 2021-04-11 15:41:32 +0200 | [diff] [blame] | 63 | serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}} |
Michal Banka | 3d48748 | 2021-02-11 10:36:47 +0100 | [diff] [blame] | 64 | volumes: |
| 65 | - name: schema-map |
| 66 | configMap: |
Michal Banka | 028e1c2 | 2021-05-10 11:00:39 +0200 | [diff] [blame] | 67 | name: {{ include "common.release" . }}-dcae-external-repo-configmap-schema-map |
Michal Banka | 3d48748 | 2021-02-11 10:36:47 +0100 | [diff] [blame] | 68 | defaultMode: 0755 |
| 69 | items: |
| 70 | - key: {{ .Values.schemaMap.filename }} |
| 71 | path: {{ .Values.schemaMap.filename }} |
Tomasz Wrobel | 9df9ba2 | 2022-12-07 12:37:02 +0100 | [diff] [blame] | 72 | - name: app-config |
| 73 | configMap: |
| 74 | name: {{ include "common.fullname" . }}-application-config-configmap |
| 75 | defaultMode: 420 |
| 76 | optional: true |
Michal Banka | 3d48748 | 2021-02-11 10:36:47 +0100 | [diff] [blame] | 77 | imagePullSecrets: |
Tomasz Wrobel | 9df9ba2 | 2022-12-07 12:37:02 +0100 | [diff] [blame] | 78 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |