@@ -18,6 +18,16 @@ spec:
spec:
securityContext:
fsGroup: 1000 # <--- Esto solucionará el fallo de "permission denied"
+ initContainers:
+ - name: fix-logs
+ image: gogs/gogs
+ imagePullPolicy: IfNotPresent
+ command: ["sh", "-c", "mkdir -p /app/gogs/log && chown -R 1000:1000 /app/gogs/log"]
+ securityContext:
+ runAsUser: 0
+ volumeMounts:
+ - name: gogs-pv
+ mountPath: /data
containers:
- image: gogs/gogs
imagePullPolicy: IfNotPresent