Enable https in nonrtric A1 simulator
[it/dep.git] / nonrtric / helm / a1simulator / templates / statefulset.yaml
1 ################################################################################
2 #   Copyright (c) 2020 Nordix Foundation.                                      #
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 ################################################################################
16
17 kind: StatefulSet
18 apiVersion: apps/v1
19 metadata:
20   name: {{ .Values.a1simulator.oscVersion.name }}
21   namespace: {{ include "common.namespace.nonrtric" . }}
22   generation: 1
23   labels:
24     app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }}
25     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
26     release: {{ .Release.Name }}
27     heritage: {{ .Release.Service }}
28   annotations:
29     deployment.kubernetes.io/revision: '1'
30 spec:
31   replicas: {{ .Values.a1simulator.oscVersion.replicaCount }}
32   selector:
33     matchLabels:
34       app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }}
35       release: {{ .Release.Name }}
36   serviceName: {{ .Values.a1simulator.name }}
37   template:
38     metadata:
39       labels:
40         app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }}
41         release: {{ .Release.Name }}
42     spec:
43       hostname: {{ include "common.name.a1simulator" . }}
44       containers:
45       - name: {{ include "common.containername.a1simulator" . }}
46         image: {{ .Values.a1simulator.image.registry }}/{{ .Values.a1simulator.image.name }}:{{ .Values.a1simulator.image.tag }}
47         imagePullPolicy: {{ .Values.a1simulator.imagePullPolicy }}
48         ports:
49         - containerPort: {{ .Values.a1simulator.service.targetPort1 }}
50           protocol: TCP
51         - containerPort: {{ .Values.a1simulator.service.targetPort2 }}
52           protocol: TCP
53         readinessProbe:
54           tcpSocket:
55             port: {{ .Values.a1simulator.service.targetPort1 }}
56           initialDelaySeconds: {{ .Values.a1simulator.readiness.initialDelaySeconds }}
57           periodSeconds: {{ .Values.a1simulator.readiness.periodSeconds }}
58         livenessProbe:
59           tcpSocket:
60             port: {{ .Values.a1simulator.service.targetPort1 }}
61           initialDelaySeconds: {{ .Values.a1simulator.liveness.initialDelaySeconds }}
62           periodSeconds: {{ .Values.a1simulator.liveness.periodSeconds }}
63         env:
64         - name: A1_VERSION
65           value: OSC_2.1.0
66
67 ---
68 kind: StatefulSet
69 apiVersion: apps/v1
70 metadata:
71   name: {{ .Values.a1simulator.stdVersion.name }}
72   namespace: {{ include "common.namespace.nonrtric" . }}
73   generation: 1
74   labels:
75     app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }}
76     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
77     release: {{ .Release.Name }}
78     heritage: {{ .Release.Service }}
79   annotations:
80     deployment.kubernetes.io/revision: '1'
81 spec:
82   replicas: {{ .Values.a1simulator.stdVersion.replicaCount }}
83   selector:
84     matchLabels:
85       app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }}
86       release: {{ .Release.Name }}
87   serviceName: {{ .Values.a1simulator.name }}
88   template:
89     metadata:
90       labels:
91         app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }}
92         release: {{ .Release.Name }}
93     spec:
94       hostname: {{ include "common.name.a1simulator" . }}
95       containers:
96       - name: {{ include "common.containername.a1simulator" . }}
97         image: {{ .Values.a1simulator.image.registry }}/{{ .Values.a1simulator.image.name }}:{{ .Values.a1simulator.image.tag }}
98         imagePullPolicy: {{ .Values.a1simulator.imagePullPolicy }}
99         ports:
100         - containerPort: {{ .Values.a1simulator.service.targetPort1 }}
101           protocol: TCP
102         - containerPort: {{ .Values.a1simulator.service.targetPort2 }}
103           protocol: TCP
104         readinessProbe:
105           tcpSocket:
106             port: {{ .Values.a1simulator.service.targetPort1 }}
107           initialDelaySeconds: {{ .Values.a1simulator.readiness.initialDelaySeconds }}
108           periodSeconds: {{ .Values.a1simulator.readiness.periodSeconds }}
109         livenessProbe:
110           tcpSocket:
111             port: {{ .Values.a1simulator.service.targetPort1 }}
112           initialDelaySeconds: {{ .Values.a1simulator.liveness.initialDelaySeconds }}
113           periodSeconds: {{ .Values.a1simulator.liveness.periodSeconds }}
114         env:
115         - name: A1_VERSION
116           value: STD_1.1.3