From: aravind.est Date: Thu, 25 Jan 2024 13:59:41 +0000 (+0000) Subject: Fix configuration file permission in a1pms X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F59%2F12459%2F4;p=it%2Fdep.git Fix configuration file permission in a1pms A1pms configuration file permission fixed to let the container override the file when requested via REST. Configmap volume has been renamed to show that the configmap is used for initial configuration. Issue-ID: NONRTRIC-967 Signed-off-by: aravind.est Change-Id: I7dbaa43c3dfad1e98899e7c8681eb918a41a7cc8 --- diff --git a/nonrtric/helm/policymanagementservice/templates/configmap.yaml b/nonrtric/helm/policymanagementservice/templates/configmap.yaml index 9c91f7d0..a7bb6b5c 100644 --- a/nonrtric/helm/policymanagementservice/templates/configmap.yaml +++ b/nonrtric/helm/policymanagementservice/templates/configmap.yaml @@ -1,5 +1,6 @@ ################################################################################ -# Copyright (c) 2020 Nordix Foundation. # +# Copyright (c) 2020-2023 Nordix Foundation. # +# Copyright (C) 2023-2024 OpenInfra Foundation Europe. 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. # @@ -18,7 +19,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "common.name.policymanagementservice" . }}-configmap-config + name: {{ include "common.name.policymanagementservice" . }}-configmap-application-yaml namespace: {{ include "common.namespace.nonrtric" . }} labels: app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }} @@ -31,7 +32,7 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "common.name.policymanagementservice" . }}-configmap-data + name: {{ include "common.name.policymanagementservice" . }}-configmap-application-json-configuration namespace: {{ include "common.namespace.nonrtric" . }} labels: app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }} diff --git a/nonrtric/helm/policymanagementservice/templates/statefulset.yaml b/nonrtric/helm/policymanagementservice/templates/statefulset.yaml index 0930d074..a2790674 100644 --- a/nonrtric/helm/policymanagementservice/templates/statefulset.yaml +++ b/nonrtric/helm/policymanagementservice/templates/statefulset.yaml @@ -1,5 +1,6 @@ ################################################################################ -# Copyright (c) 2020 Nordix Foundation. # +# Copyright (c) 2020-2023 Nordix Foundation. # +# Copyright (C) 2023-2024 OpenInfra Foundation Europe. 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. # @@ -49,13 +50,14 @@ spec: - -c - FILE=/var/policy-management-service/application_configuration.json; if [ ! -f $FILE ]; then - cp /etc/app/policy-management-service/initialdata/application_configuration.json $FILE; - fi + cp /etc/app/policy-management-service/application_configuration_json_initial/application_configuration.json $FILE; + fi; + chmod 666 $FILE; volumeMounts: - name: {{ include "common.name.policymanagementservice" . }}-vardata mountPath: "/var/policy-management-service" - - name: {{ include "common.name.policymanagementservice" . }}-policy-data - mountPath: /etc/app/policy-management-service/initialdata + - name: {{ include "common.name.policymanagementservice" . }}-application-configuration-json-initial + mountPath: /etc/app/policy-management-service/application_configuration_json_initial containers: - name: {{ include "common.container.policymanagementservice" . }} image: {{ .Values.policymanagementservice.image.registry }}/{{ .Values.policymanagementservice.image.name }}:{{ .Values.policymanagementservice.image.tag }} @@ -79,17 +81,17 @@ spec: volumeMounts: - name: {{ include "common.name.policymanagementservice" . }}-vardata mountPath: "/var/policy-management-service" - - name: {{ include "common.name.policymanagementservice" . }}-policy-config + - name: {{ include "common.name.policymanagementservice" . }}-application-yaml mountPath: /opt/app/policy-agent/config - - name: {{ include "common.name.policymanagementservice" . }}-policy-data - mountPath: /etc/app/policy-management-service/initialdata + - name: {{ include "common.name.policymanagementservice" . }}-application-configuration-json-initial + mountPath: /etc/app/policy-management-service/application_configuration_json_initial volumes: - - name: {{ include "common.name.policymanagementservice" . }}-policy-config + - name: {{ include "common.name.policymanagementservice" . }}-application-yaml configMap: - name: {{ include "common.name.policymanagementservice" . }}-configmap-config - - name: {{ include "common.name.policymanagementservice" . }}-policy-data + name: {{ include "common.name.policymanagementservice" . }}-configmap-application-yaml + - name: {{ include "common.name.policymanagementservice" . }}-application-configuration-json-initial configMap: - name: {{ include "common.name.policymanagementservice" . }}-configmap-data + name: {{ include "common.name.policymanagementservice" . }}-configmap-application-json-configuration volumeClaimTemplates: - metadata: name: {{ include "common.name.policymanagementservice" . }}-vardata