# ============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: pmlog namespace: nonrtric labels: app: pmlog spec: replicas: 1 serviceName: pmlog selector: matchLabels: app: pmlog template: metadata: labels: app: pmlog spec: volumes: - name: pmlog-app-cm configMap: name: pmlog-app-cm - name: pmlog-job-cm configMap: name: pmlog-job-cm - name: token-cache-volume emptyDir: {} containers: - name: auth-token image: nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-plt-auth-token-fetch:1.1.1 imagePullPolicy: Always env: - name: CREDS_GRANT_TYPE value: client_credentials - name: CREDS_CLIENT_SECRET value: {{ .Values.nrtpmlog.clientsecret }} - name: CREDS_CLIENT_ID value: nrt-pm-log - name: AUTH_SERVICE_URL value: http://keycloak.nonrtric:8080/realms/nonrtric-realm/protocol/openid-connect/token - name: OUTPUT_FILE value: /token-cache/jwt.txt volumeMounts: - mountPath: /token-cache name: token-cache-volume - name: pmlog image: nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-plt-pmlog:1.0.0 imagePullPolicy: Always command: - sh - -c - until [ -e /token-cache/jwt.txt ]; do echo "Waiting for JWT to be available"; sleep 1; done; /jre/bin/java -jar /opt/app/pmlog-service/pmlog.jar ports: - name: http containerPort: 8084 - name: https containerPort: 8436 volumeMounts: - name: pmlog-app-cm mountPath: /opt/app/pmlog-service/config/application.yaml subPath: application.yaml - name: pmlog-job-cm mountPath: /opt/app/pmlog-service/config/jobDefinition.json subPath: jobDefinition.json - mountPath: /token-cache name: token-cache-volume env: - name: APP_INFLUX_ACCESSTOKEN valueFrom: secretKeyRef: name: influxdb-api-token key: token