865e2ca002e5030da0b018bfae1a8f271813058a
[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.internalPort }}
50           protocol: TCP
51         readinessProbe:
52           tcpSocket:
53             port: {{ .Values.a1simulator.service.internalPort }}
54           initialDelaySeconds: 5
55           periodSeconds: 15
56         env:
57         - name: A1_VERSION
58           value: OSC_2.1.0
59
60 ---
61 kind: StatefulSet
62 apiVersion: apps/v1
63 metadata:
64   name: {{ .Values.a1simulator.stdVersion.name }}
65   namespace: {{ include "common.namespace.nonrtric" . }}
66   generation: 1
67   labels:
68     app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }}
69     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
70     release: {{ .Release.Name }}
71     heritage: {{ .Release.Service }}
72   annotations:
73     deployment.kubernetes.io/revision: '1'
74 spec:
75   replicas: {{ .Values.a1simulator.stdVersion.replicaCount }}
76   selector:
77     matchLabels:
78       app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }}
79       release: {{ .Release.Name }}
80   serviceName: {{ .Values.a1simulator.name }}
81   template:
82     metadata:
83       labels:
84         app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }}
85         release: {{ .Release.Name }}
86     spec:
87       hostname: {{ include "common.name.a1simulator" . }}
88       containers:
89       - name: {{ include "common.containername.a1simulator" . }}
90         image: {{ .Values.a1simulator.image.registry }}/{{ .Values.a1simulator.image.name }}:{{ .Values.a1simulator.image.tag }}
91         imagePullPolicy: {{ .Values.a1simulator.imagePullPolicy }}
92         ports:
93         - containerPort: {{ .Values.a1simulator.service.internalPort }}
94           protocol: TCP
95         readinessProbe:
96           tcpSocket:
97             port: {{ .Values.a1simulator.service.internalPort }}
98           initialDelaySeconds: 5
99           periodSeconds: 15
100         env:
101         - name: A1_VERSION
102           value: STD_1.1.3