Updated installation and components
[nonrtric/plt/ranpm.git] / install / helm / nrt-pm / charts / kafka-producer-pm-xml2json / templates / app-statefulset.yaml
1 #  ============LICENSE_START===============================================
2 #  Copyright (C) 2023 Nordix Foundation. 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
19 apiVersion: apps/v1
20 kind: StatefulSet
21 metadata:
22   name: kafka-producer-pm-xml2json
23   namespace: nonrtric
24   labels:
25     app: kafka-producer-pm-xml2json
26
27 spec:
28   replicas: 1
29   serviceName: kafka-producer-pm-xml2json
30   selector:
31     matchLabels:
32       app: kafka-producer-pm-xml2json
33   template:
34     metadata:
35       labels:
36         app: kafka-producer-pm-xml2json
37
38     spec:
39       containers:
40       - name: kafka-producer-pm-xml2json
41         image: {{ .Values.global.extimagerepo }}pm-file-converter:latest
42         {{- if .Values.global.extimagerepo }}
43         imagePullPolicy: Always
44         {{- else }}
45         imagePullPolicy: Never
46         {{- end }}
47         ports:
48         - name: http
49           containerPort: 80
50         env:
51         - name: E1
52           valueFrom:
53             fieldRef:
54               fieldPath: metadata.name
55         - name: KP
56           valueFrom:
57             fieldRef:
58               fieldPath: metadata.name
59
60         - name: KAFKA_SERVER
61           value: kafka-1-kafka-bootstrap.nonrtric:9097
62         - name: ICS
63           value: informationservice.nonrtric:8083
64         - name: SELF
65           value: "$(E1).kafka-producer-pm-xml2json.nonrtric:80"
66         - name: FILESTORE_USER
67           value: admin
68         - name: FILESTORE_PWD
69           value: adminadmin
70         - name: FILESTORE_SERVER
71           value: minio.nonrtric:9000
72         - name: CREDS_GRANT_TYPE
73           value: client_credentials
74         - name: CREDS_CLIENT_SECRET
75           value: {{ .Values.kafkaproducerpmxml2json.clientsecret }}
76         - name: CREDS_CLIENT_ID
77           value: kafka-producer-pm-xml2json
78         - name: AUTH_SERVICE_URL
79           value: http://keycloak.nonrtric:8080/realms/nonrtric-realm/protocol/openid-connect/token
80         volumeMounts:
81         - mountPath: /application_configuration.json
82           subPath: application_configuration.json
83           name: kafka-producer-pm-xml2json-cm-config
84       volumes:
85       - configMap:
86           defaultMode: 420
87           name: kafka-producer-pm-xml2json-cm-config
88         name: kafka-producer-pm-xml2json-cm-config