Add NONRTRIC rAppmanager HELM charts
[it/dep.git] / nonrtric / helm / rappmanager / templates / statefulset.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: StatefulSet
19 apiVersion: apps/v1
20 metadata:
21   name: {{ include "common.name.rappmanager" . }}
22   namespace: {{ include "common.namespace.nonrtric" . }}
23   generation: 1
24   labels:
25     app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.rappmanager" . }}
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   serviceName: {{ include "common.name.rappmanager" . }}
33   replicas: 1
34   selector:
35     matchLabels:
36       app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.rappmanager" . }}
37       release: {{ .Release.Name }}
38   template:
39     metadata:
40       labels:
41         app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.rappmanager" . }}
42         release: {{ .Release.Name }}
43     spec:
44       hostname: {{ include "common.name.rappmanager" . }}
45       containers:
46       - name: {{ include "common.container.rappmanager" . }}
47         image: {{ .Values.rappmanager.image.registry }}/{{ .Values.rappmanager.image.name }}:{{ .Values.rappmanager.image.tag }}
48         imagePullPolicy: {{ .Values.rappmanager.imagePullPolicy }}
49         ports:
50         - containerPort: {{ .Values.rappmanager.service.targetPort1 }}
51           protocol: TCP
52         readinessProbe:
53           tcpSocket:
54             port: {{ .Values.rappmanager.service.targetPort1 }}
55           initialDelaySeconds: {{ .Values.rappmanager.liveness.initialDelaySeconds }}
56           periodSeconds: {{ .Values.rappmanager.liveness.periodSeconds }}
57         livenessProbe:
58           tcpSocket:
59             port: {{ .Values.rappmanager.service.targetPort1 }}
60           initialDelaySeconds: {{ .Values.rappmanager.liveness.initialDelaySeconds }}
61           periodSeconds: {{ .Values.rappmanager.liveness.periodSeconds }}
62         env:
63         - name: RAPPMANAGER_ACM_USERNAME
64           valueFrom:
65             secretKeyRef:
66               name: {{ include "common.name.rappmanager" . }}-acm-secret
67               key: username
68         - name: RAPPMANAGER_ACM_PASSWORD
69           valueFrom:
70             secretKeyRef:
71               name: {{ include "common.name.rappmanager" . }}-acm-secret
72               key: password
73         volumeMounts:
74         - name: {{ include "common.name.rappmanager" . }}-rappmanager-config
75           mountPath: /opt/app/rappmanager/config
76       volumes:
77         - name: {{ include "common.name.rappmanager" . }}-rappmanager-config
78           configMap:
79             name: {{ include "common.name.rappmanager" . }}-configmap-config