f69b8f4fefa3eb799c05554ac9ee80779f3d1c38
[nonrtric/plt/ranpm.git] / install / helm / nrt-pm-log / 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: pmlog
23   namespace: nonrtric
24   labels:
25     app: pmlog
26 spec:
27   replicas: 1
28   serviceName: pmlog
29   selector:
30     matchLabels:
31       app: pmlog
32   template:
33     metadata:
34       labels:
35         app: pmlog
36     spec:
37       volumes:
38         - name: pmlog-app-cm
39           configMap:
40             name: pmlog-app-cm
41         - name: pmlog-job-cm
42           configMap:
43             name: pmlog-job-cm
44         - name: token-cache-volume
45           emptyDir: {}
46       containers:
47       - name: pmlog
48         image: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-plt-pmlog:1.0.0
49         #image: o-ran-sc/nonrtric-plt-pmlog:1.0.0-SNAPSHOT
50         imagePullPolicy: Always
51         #imagePullPolicy: Never
52         ports:
53         - name: http
54           containerPort: 8084
55         - name: https
56           containerPort: 8436
57         volumeMounts:
58         - name: pmlog-app-cm
59           mountPath: /opt/app/pmlog-service/config/application.yaml
60           subPath: application.yaml
61         - name: pmlog-job-cm
62           mountPath: /opt/app/pmlog-service/config/jobDefinition.json
63           subPath: jobDefinition.json
64         - mountPath: /token-cache
65           name: token-cache-volume
66         env:
67         - name: APP_INFLUX_ACCESS-TOKEN
68           valueFrom:
69             secretKeyRef:
70               name: influxdb-api-token
71               key: token
72       - name: auth-token
73         image: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-plt-auth-token-fetch:1.1.1
74         imagePullPolicy: Always
75         env:
76         - name: CREDS_GRANT_TYPE
77           value: client_credentials
78         - name: CREDS_CLIENT_SECRET
79           value: {{ .Values.nrtpmlog.clientsecret }}
80         - name: CREDS_CLIENT_ID
81           value: nrt-pm-log
82         - name: AUTH_SERVICE_URL
83           value: http://keycloak.nonrtric:8080/realms/nonrtric-realm/protocol/openid-connect/token
84         - name: OUTPUT_FILE
85           value: /token-cache/jwt.txt
86         volumeMounts:
87         - mountPath: /token-cache
88           name: token-cache-volume
89
90
91
92
93