1
0
Fork 0
mirror of https://github.com/imjasonh/git-k8s synced 2026-07-09 07:06:52 +00:00

Use gitea rootless image in e2e test

Gitea 1.21 refuses to run as root. The non-rootless image's
entrypoint switches to the git user, but kubectl exec still runs
as root, causing `gitea admin user create` to fail with:
  "Gitea is not supposed to be run as root"

Switch to gitea/gitea:1.21-rootless which runs as UID 1000,
and mount emptyDir volumes at /var/lib/gitea and /etc/gitea.

https://claude.ai/code/session_01QfFzqKQUsxxBsiZUhuJ3pG
This commit is contained in:
Claude 2026-02-28 01:36:42 +00:00
parent de30422c67
commit 890c2b7ec9
No known key found for this signature in database

View file

@ -111,7 +111,7 @@ jobs:
spec:
containers:
- name: gitea
image: gitea/gitea:1.21
image: gitea/gitea:1.21-rootless
ports:
- containerPort: 3000
name: http
@ -132,10 +132,14 @@ jobs:
memory: 256Mi
volumeMounts:
- name: data
mountPath: /data
mountPath: /var/lib/gitea
- name: config
mountPath: /etc/gitea
volumes:
- name: data
emptyDir: {}
- name: config
emptyDir: {}
EOF
kubectl apply -f - <<'EOF'
apiVersion: v1