From 9a6d11a6a02a8bc62e87e166bc29f89e760ca198 Mon Sep 17 00:00:00 2001 From: "aravind.est" Date: Wed, 7 Aug 2024 16:33:01 +0100 Subject: [PATCH] Add group and user details for a1pms volume mount 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 --- nonrtric/RECIPE_EXAMPLE/example_recipe.yaml | 4 ++++ nonrtric/helm/policymanagementservice/templates/statefulset.yaml | 1 + nonrtric/helm/policymanagementservice/values.yaml | 6 +++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml index 24f168d1..2ccbb75c 100644 --- a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml +++ b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml @@ -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: diff --git a/nonrtric/helm/policymanagementservice/templates/statefulset.yaml b/nonrtric/helm/policymanagementservice/templates/statefulset.yaml index a2790674..fd4a34ad 100644 --- a/nonrtric/helm/policymanagementservice/templates/statefulset.yaml +++ b/nonrtric/helm/policymanagementservice/templates/statefulset.yaml @@ -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" diff --git a/nonrtric/helm/policymanagementservice/values.yaml b/nonrtric/helm/policymanagementservice/values.yaml index 4e24f8c5..7191f1d7 100644 --- a/nonrtric/helm/policymanagementservice/values.yaml +++ b/nonrtric/helm/policymanagementservice/values.yaml @@ -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 -- 2.16.6