fix(f6): fix-data-perms must run as root; add PSA labels to logging + cnpg-system
The init container that chowns the runner PVC to 1000:1000 was left with the runner's uid (1000), so `chown` failed and the arm64/amd64 runners could not start. It now runs as root for that one operation; the runner container itself stays uid 1000. Also label `logging` (warn+audit restricted alongside enforce=privileged) and `cnpg-system` (warn+audit) so every namespace reports PSA violations instead of silently allowing them — cnpg-system's labels live in the vendored operator manifest because Flux owns that Namespace object and strips out-of-band labels.
This commit is contained in:
parent
da5530200e
commit
4c0bbe2d12
4 changed files with 28 additions and 23 deletions
|
|
@ -79,11 +79,8 @@ spec:
|
|||
image: docker:27-dind
|
||||
imagePullPolicy: IfNotPresent
|
||||
securityContext:
|
||||
# The image's own user. No root needed: the dind socket is created
|
||||
# 0660 root:1000 by `dockerd --group 1000`, and fix-data-perms
|
||||
# re-owns the PVC as 1000:1000 so the actions cache is writable.
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
# root is needed for exactly one thing: chown of the PVC.
|
||||
runAsUser: 0
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
|
|
@ -175,14 +172,12 @@ spec:
|
|||
- name: runner
|
||||
image: code.forgejo.org/forgejo/runner:5.0.1
|
||||
imagePullPolicy: IfNotPresent
|
||||
# The image runs as uid 1000. The dind socket is created 660
|
||||
# root:docker and the one-shot chmod 666 in the dind container can
|
||||
# race a dockerd restart, after which the runner crashloops on
|
||||
# "permission denied ... /var/run/docker.sock" (its wait loop only
|
||||
# checks that the socket exists). Running the runner as root removes
|
||||
# the dependency on that race; it is the uid the dind setup assumes.
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
# The image's own user. No root needed: the dind socket is 0660
|
||||
# root:1000 (`dockerd --group 1000`) and fix-data-perms owns the PVC
|
||||
# as 1000:1000, so the actions cache is writable.
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
|
|
|
|||
Loading…
Reference in a new issue