Merge "[AAI] Add model-loader tracing config"
[oom.git] / kubernetes / dcaegen2-services / components / dcae-ves-openapi-manager / templates / deployment.yaml
1 {{/*
2 #============LICENSE_START========================================================
3 # ================================================================================
4 # Copyright (c) 2021 Nokia. All rights reserved.
5 # Modifications Copyright © 2023 Nordix Foundation.
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:
49           - name: SDC_ADDRESS
50             value: sdc-be.{{include "common.namespace" .}}:8080
51           - name: SCHEMA_MAP_PATH
52             value: {{ .Values.schemaMap.directory }}/{{ .Values.schemaMap.filename }}
53           - name: SASL_JAAS_CONFIG
54             valueFrom:
55               secretKeyRef:
56                 name: {{ include "common.name" . }}-ku
57                 key: sasl.jaas.config
58           volumeMounts:
59             - name: schema-map
60               mountPath: {{ .Values.schemaMap.directory }}
61             - name: app-config
62               mountPath: /app/config/
63       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
64       volumes:
65         - name: schema-map
66           configMap:
67             name: {{ include "common.release" . }}-dcae-external-repo-configmap-schema-map
68             defaultMode: 0755
69             items:
70               - key: {{ .Values.schemaMap.filename }}
71                 path: {{ .Values.schemaMap.filename }}
72         - name: app-config
73           configMap:
74             name: {{ include "common.fullname" . }}-application-config-configmap
75             defaultMode: 420
76             optional: true
77       {{- include "common.imagePullSecrets" . | nindent 6 }}