Add NONRTRIC DME ACM Participant charts
[it/dep.git] / nonrtric / helm / dmeparticipant / templates / deployment.yaml
1 #  ============LICENSE_START===============================================
2 #  Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved.
3 #  ========================================================================
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15 #  ============LICENSE_END=================================================
16 #
17
18 kind: Deployment
19 apiVersion: apps/v1
20 metadata:
21   name: {{ include "common.name.dmeparticipant" . }}
22   namespace: {{ include "common.namespace.nonrtric" . }}
23   generation: 1
24   labels:
25     app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmeparticipant" . }}
26     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
27     release: {{ .Release.Name }}
28     heritage: {{ .Release.Service }}
29   annotations:
30     deployment.kubernetes.io/revision: '1'
31 spec:
32   replicas: 1
33   selector:
34     matchLabels:
35       app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmeparticipant" . }}
36       release: {{ .Release.Name }}
37   template:
38     metadata:
39       labels:
40         app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmeparticipant" . }}
41         release: {{ .Release.Name }}
42     spec:
43       hostname: {{ include "common.name.dmeparticipant" . }}
44       containers:
45       - name: {{ include "common.container.dmeparticipant" . }}
46         image: {{ .Values.dmeparticipant.image.registry }}/{{ .Values.dmeparticipant.image.name }}:{{ .Values.dmeparticipant.image.tag }}
47         imagePullPolicy: {{ .Values.dmeparticipant.imagePullPolicy }}
48         ports:
49         - containerPort: {{ .Values.dmeparticipant.service.targetPort1 }}
50           protocol: TCP
51         readinessProbe:
52           tcpSocket:
53             port: {{ .Values.dmeparticipant.service.targetPort1 }}
54           initialDelaySeconds: {{ .Values.dmeparticipant.liveness.initialDelaySeconds }}
55           periodSeconds: {{ .Values.dmeparticipant.liveness.periodSeconds }}
56         livenessProbe:
57           tcpSocket:
58             port: {{ .Values.dmeparticipant.service.targetPort1 }}
59           initialDelaySeconds: {{ .Values.dmeparticipant.liveness.initialDelaySeconds }}
60           periodSeconds: {{ .Values.dmeparticipant.liveness.periodSeconds }}
61         env:
62         - name: SPRING_SECURITY_USER_NAME
63           valueFrom:
64             secretKeyRef:
65               name: {{ include "common.name.dmeparticipant" . }}-security-secret
66               key: username
67         - name: SPRING_SECURITY_USER_PASSWORD
68           valueFrom:
69             secretKeyRef:
70               name: {{ include "common.name.dmeparticipant" . }}-security-secret
71               key: password
72         volumeMounts:
73         - name: {{ include "common.name.dmeparticipant" . }}-dmeparticipant-config
74           mountPath: /opt/app/participant/dme/config/
75       volumes:
76         - name: {{ include "common.name.dmeparticipant" . }}-dmeparticipant-config
77           configMap:
78             name: {{ include "common.name.dmeparticipant" . }}-configmap-config