diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index 6d50f48..6feaa7b 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -23,7 +23,7 @@ spec: spec: containers: - image: codeberg.org/forgejo/forgejo:10.0.1 - imagePullPolicy: Always + imagePullPolicy: IfNotPresent env: - name: USER_UID value: "1000" @@ -40,6 +40,14 @@ spec: volumeMounts: - mountPath: "/data" name: forgejo-pv-storage + initContainers: + - 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: