Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runAsNonRoot possible ? #662

Open
Ulrar opened this issue Dec 8, 2024 · 1 comment
Open

runAsNonRoot possible ? #662

Ulrar opened this issue Dec 8, 2024 · 1 comment
Labels
question Further information is requested

Comments

@Ulrar
Copy link

Ulrar commented Dec 8, 2024

Spegel version

0.0.27

Kubernetes distribution

Talos 1.8.3

Kubernetes version

1.31.1

CNI

flannel, I think ? Whatever the default in Talos is

Describe the bug

Spegel won't start with runAsNonRoot, with the configuration container logging this :

{"time":"2024-12-08T12:53:50.440469719Z","level":"ERROR","source":{"function":"main.main","file":"/build/main.go","line":86},"msg":"run exit with error","err":"stat /etc/cri/conf.d/hosts/_backup: permission denied"}

The directory is empty :

❯ talosctl --talosconfig talosconfig -n mynode list /etc/cri/conf.d/hosts/
NODE            NAME
talos-fdm-9ig   .
❯

Explicitly setting runAsNonRoot: false does let it start, and as far as I can tell it works. My question is can I do anything to make it run as non root, is there some specific runAsUser or fsGroup that would make it work, or is root required on Talos ?
If it's required, I'd suggest making a note of that in the compatibility notes as it seems the default does not work.

Thanks

@Ulrar Ulrar added the bug Something isn't working label Dec 8, 2024
@phillebaba
Copy link
Member

Running as non root is not possible at the moment because the UID is required to communicate with the Containerd socket. This is not specific to Talos but for all Kubernetes flavors.

@phillebaba phillebaba added question Further information is requested and removed bug Something isn't working labels Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants