From 03718d09f889b2ea1da9fc0b0428e9887f5feae3 Mon Sep 17 00:00:00 2001 From: Tom Neuber Date: Thu, 13 Mar 2025 18:59:25 +0100 Subject: [PATCH] chore(deployment): fix permissions --- k8s/deployment.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index d7bd1fc..6e21176 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -23,7 +23,7 @@ spec: spec: containers: - image: codeberg.org/forgejo/forgejo:10.0.1-rootless - imagePullPolicy: Always + imagePullPolicy: IfNotPresent env: - name: USER_UID value: "1000" @@ -40,6 +40,14 @@ spec: volumeMounts: - mountPath: "/data" name: forgejo-pv-storage + initConainters: + - name: fix-permissions + image: busybox + imagePullPolicy: IfNotPresent + command: ["sh", "-c", "chown -R 1000:1000 /mnt"] + volumeMounts: + - mountPath: "/mnt" + name: forgejo-pv-storage volumes: - name: forgejo-pv-storage persistentVolumeClaim: