Discrepancy between `spec.installConfig.users` and users used to run components
Before creating an issue, make sure you've checked the following:
- You are running the latest released version of k0s
- Make sure you've searched for existing issues, both open and closed
- Make sure you've searched for PRs too, a fix might've been merged already
- You're looking at docs for the released version, "main" branch docs are usually ahead of released versions.
Platform
N/AVersion
main branch
Sysinfo
N/A
What happened?
K0s provides a way to specify users to be created during installation. That's what spec.installConfig.users is used for. However, these users are not used for anything else. In particular, the users used to run the components are hard-coded.
Steps to reproduce
- Modify
spec.installConfig.usersso that it deviates from the defaults. - Run
k0s installwith that config. - Start k0s and have a look at the logs and the users used to run supervised processes.
Expected behavior
I suppose the most common expectation would be that the users to be installed are also the users used to run the supervised components.
Actual behavior
The configured users are being created. However, the default users are tried when running the components.
Screenshots and logs
No response
Additional context
The location and naming of the users within the config spec hierarchy seems appropriate for their actual use, although the current implementation makes me wonder if having these config fields at all is useful.
On the other hand, changing the hard-coded defaults to use the configured usernames would make the config naming bad.
Source: k0sproject/k0s