From 84544f905cfad3dcc63dee0a8d49e2801227add3 Mon Sep 17 00:00:00 2001 From: Raffaele Vitiello Date: Mon, 29 Jun 2026 15:24:27 +0200 Subject: [PATCH] fix(chart): fsGroup 1001 per scrivere sul PVC media MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Senza fsGroup il volume Azure è montato root:root e Payload fallisce gli upload ("problem while uploading the file"): il container gira come uid/gid 1001. --- deploy/helm/developers-cms/templates/deployment.yaml | 4 ++++ deploy/helm/developers-cms/values.yaml | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/deploy/helm/developers-cms/templates/deployment.yaml b/deploy/helm/developers-cms/templates/deployment.yaml index 1d05e3e..1e642df 100644 --- a/deploy/helm/developers-cms/templates/deployment.yaml +++ b/deploy/helm/developers-cms/templates/deployment.yaml @@ -27,6 +27,10 @@ spec: imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.podSecurityContext }} + securityContext: + {{- toYaml . | nindent 8 }} + {{- end }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.app.image.repository }}:{{ .Values.app.image.tag }}" diff --git a/deploy/helm/developers-cms/values.yaml b/deploy/helm/developers-cms/values.yaml index 638da16..bf83c7e 100644 --- a/deploy/helm/developers-cms/values.yaml +++ b/deploy/helm/developers-cms/values.yaml @@ -4,6 +4,12 @@ replicaCount: 1 +# Security context del pod. fsGroup rende il PVC dei media scrivibile dall'utente +# del container (l'immagine gira come uid/gid 1001): senza, il volume Azure è +# montato root:root e Payload fallisce gli upload ("problem while uploading the file"). +podSecurityContext: + fsGroup: 1001 + app: image: repository: ghcr.io/italia/developers-cms