Helm charts and apps for pm-setup
[nonrtric/plt/ranpm.git] / install / helm / nrt-pm / charts / kafka-producer-pm-json2influx / templates / app-statefulset.yaml
diff --git a/install/helm/nrt-pm/charts/kafka-producer-pm-json2influx/templates/app-statefulset.yaml b/install/helm/nrt-pm/charts/kafka-producer-pm-json2influx/templates/app-statefulset.yaml
new file mode 100644 (file)
index 0000000..b8055a8
--- /dev/null
@@ -0,0 +1,84 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2023 Nordix Foundation. All rights reserved.
+#  ========================================================================
+#  Licensed under the Apache License, Version 2.0 (the "License");
+#  you may not use this file except in compliance with the License.
+#  You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#  ============LICENSE_END=================================================
+#
+
+
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+  name: kafka-producer-pm-json2influx
+  namespace: nonrtric
+  labels:
+    app: kafka-producer-pm-json2influx
+
+spec:
+  replicas: 1
+  serviceName: kafka-producer-pm-json2influx
+  selector:
+    matchLabels:
+      app: kafka-producer-pm-json2influx
+  template:
+    metadata:
+      labels:
+        app: kafka-producer-pm-json2influx
+
+    spec:
+      containers:
+      - name: kafka-producer-pm-json2influx
+        image: kafka-pm-producer:latest
+        imagePullPolicy: Never
+        ports:
+        - name: http
+          containerPort: 80
+        env:
+        - name: E1
+          valueFrom:
+            fieldRef:
+              fieldPath: metadata.name
+        - name: KP
+          valueFrom:
+            fieldRef:
+              fieldPath: metadata.name
+
+        - name: KAFKA_SERVER
+          value: kafka-1-kafka-bootstrap.nonrtric:9097
+        - name: ICS
+          value: informationservice.nonrtric:8083
+        - name: SELF
+          value: "$(E1).kafka-producer-pm-json2influx.nonrtric:80"
+        - name: FILESTORE_USER
+          value: admin
+        - name: FILESTORE_PWD
+          value: adminadmin
+        - name: FILESTORE_SERVER
+          value: minio.nonrtric:9000
+        - name: CREDS_GRANT_TYPE
+          value: client_credentials
+        - name: CREDS_CLIENT_SECRET
+          value: {{ .Values.kafkaproducerpmjson2influx.clientsecret }}
+        - name: CREDS_CLIENT_ID
+          value: kafka-producer-pm-json2influx
+        - name: AUTH_SERVICE_URL
+          value: http://keycloak.nonrtric:8080/realms/nonrtric-realm/protocol/openid-connect/token
+        volumeMounts:
+        - mountPath: /application_configuration.json
+          subPath: application_configuration.json
+          name: kafka-producer-pm-json2influx-cm-config
+      volumes:
+      - configMap:
+          defaultMode: 420
+          name: kafka-producer-pm-json2influx-cm-config
+        name: kafka-producer-pm-json2influx-cm-config