mirror of
https://github.com/imjasonh/git-k8s
synced 2026-07-18 15:05:45 +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:
parent
de30422c67
commit
890c2b7ec9
1 changed files with 6 additions and 2 deletions
8
.github/workflows/ci.yaml
vendored
8
.github/workflows/ci.yaml
vendored
|
|
@ -111,7 +111,7 @@ jobs:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: gitea
|
- name: gitea
|
||||||
image: gitea/gitea:1.21
|
image: gitea/gitea:1.21-rootless
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 3000
|
- containerPort: 3000
|
||||||
name: http
|
name: http
|
||||||
|
|
@ -132,10 +132,14 @@ jobs:
|
||||||
memory: 256Mi
|
memory: 256Mi
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: data
|
- name: data
|
||||||
mountPath: /data
|
mountPath: /var/lib/gitea
|
||||||
|
- name: config
|
||||||
|
mountPath: /etc/gitea
|
||||||
volumes:
|
volumes:
|
||||||
- name: data
|
- name: data
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
|
- name: config
|
||||||
|
emptyDir: {}
|
||||||
EOF
|
EOF
|
||||||
kubectl apply -f - <<'EOF'
|
kubectl apply -f - <<'EOF'
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue