Add DME Participant charts in ORAN_OOM
[it/dep.git] / smo-install / oran_oom / policy-clamp-ac-dme-ppnt / templates / deployment.yaml
1 {{/*
2 #  ============LICENSE_START=======================================================
3 #  Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
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
8 #
9 #       http://www.apache.org/licenses/LICENSE-2.0
10 #
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.
16 #
17 #  SPDX-License-Identifier: Apache-2.0
18 #  ============LICENSE_END=========================================================
19 */}}
20
21 apiVersion: apps/v1
22 kind: Deployment
23 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
24 spec:
25   selector: {{- include "common.selectors" . | nindent 4 }}
26   replicas: {{ .Values.replicaCount }}
27   template:
28     metadata: {{- include "common.templateMetadata" . | nindent 6 }}
29     spec:
30       containers:
31         - name: {{ include "common.name" . }}
32           image: {{ .Values.image }}
33           imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
34           ports: {{ include "common.containerPorts" . | nindent 12  }}
35           # disable liveness probe when breakpoints set in debugger
36           # so K8s doesn't restart unresponsive container
37           {{- if eq .Values.liveness.enabled true }}
38           livenessProbe:
39             tcpSocket:
40               port: {{ .Values.liveness.port }}
41             initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
42             periodSeconds: {{ .Values.liveness.periodSeconds }}
43           {{ end -}}
44           readinessProbe:
45             tcpSocket:
46               port: {{ .Values.readiness.port }}
47             initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
48             periodSeconds: {{ .Values.readiness.periodSeconds }}
49           env:
50           - name: RESTSERVER_USER
51             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-secret" "key" "login") | indent 12 }}
52           - name: RESTSERVER_PASSWORD
53             {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-secret" "key" "password") | indent 12 }}
54 {{- if .Values.global.useStrimziKafka }}
55           - name: SASL_JAAS_CONFIG
56             valueFrom:
57               secretKeyRef:
58                 name: {{ include "common.name" . }}-ku
59                 key: sasl.jaas.config
60 {{- end }}
61           volumeMounts:
62           - mountPath: /opt/app/participant/dme/config/
63             name: ac-dme-ppnt-config
64           resources: {{ include "common.resources" . | nindent 12 }}
65         {{- if .Values.nodeSelector }}
66         nodeSelector:
67 {{ toYaml .Values.nodeSelector | indent 10 }}
68         {{- end -}}
69         {{- if .Values.affinity }}
70         affinity:
71 {{ toYaml .Values.affinity | indent 10 }}
72         {{- end }}
73       serviceAccountName: {{ include "common.fullname" (dict "suffix" "create" "dot" . )}}
74       volumes:
75         - name: ac-dme-ppnt-config
76           configMap:
77             name: {{ include "common.fullname" . }}-configmap
78             defaultMode: 0755
79       imagePullSecrets:
80       - name: "{{ include "common.namespace" . }}-docker-registry-key"