Add group and user details for a1pms volume mount 51/13251/2
authoraravind.est <aravindhan.a@est.tech>
Wed, 7 Aug 2024 15:33:01 +0000 (16:33 +0100)
committeraravind.est <aravindhan.a@est.tech>
Thu, 8 Aug 2024 15:33:35 +0000 (16:33 +0100)
Volume mount ownership can be passed as User and Group uid.
This needs to be in sync with the container build arguments.

Issue-ID: NONRTRIC-1025
Change-Id: I32031736d83cc92691e8194b5ff46635efc2f6b4
Signed-off-by: aravind.est <aravindhan.a@est.tech>
nonrtric/RECIPE_EXAMPLE/example_recipe.yaml
nonrtric/helm/policymanagementservice/templates/statefulset.yaml
nonrtric/helm/policymanagementservice/values.yaml

index 24f168d..2ccbb75 100644 (file)
@@ -122,6 +122,10 @@ policymanagementservice:
       storageClassName: pms-storage
     ingress:
       enabled: true
+    #Volumepermissions needs to align with the container build arguments
+    volumepermissions:
+      groupid: 120957
+      userid: 120957
 
 # A1 Controller may take few more minutes to start. Increase the initialDelaySeconds in liveness to avoid container restart.
 a1controller:
index a279067..fd4a34a 100644 (file)
@@ -53,6 +53,7 @@ spec:
             cp  /etc/app/policy-management-service/application_configuration_json_initial/application_configuration.json $FILE;
           fi;
           chmod 666 $FILE;
+          chown {{ .Values.policymanagementservice.volumepermissions.groupid }}:{{ .Values.policymanagementservice.volumepermissions.userid }} -R /var/policy-management-service/;
         volumeMounts:
         - name: {{ include "common.name.policymanagementservice" . }}-vardata
           mountPath: "/var/policy-management-service"
index 4e24f8c..7191f1d 100644 (file)
@@ -1,6 +1,6 @@
 #  ============LICENSE_START===============================================
 #  Copyright (C) 2020-2023 Nordix Foundation. All rights reserved.
-#  Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved.
+#  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.
@@ -44,3 +44,7 @@ policymanagementservice:
     storageClassName: standard
   ingress:
     enabled: false
+  #Volumepermissions needs to align with the container build arguments
+  volumepermissions:
+    groupid: 120957
+    userid: 120957
\ No newline at end of file