canonical / canonical/operator
Example (including tutorial) K8s charms should set charm-user
- Dominant language
- Python
- Stars
- 267
- Forks
- 136
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 28
Description
We should be able to set [charm-user](https://documentation.ubuntu.com/charmcraft/stable/reference/files/charmcraft-yaml-file/#charm-user) to `non-root` (or at least `sudoer`) for the Zero-to-Hero charm and any example charms. We should set `uid` and `gid` for the container as well, I believe.
I'm not sure if this would be a "needs to wait until Charmcraft 5" item, but I wonder if we also should have the `kubernetes` profile have this set to `non-root` with a comment (and link to the docs) that it can be changed if the charm has to run as root or have sudo for some reason. Defaulting to the lower privileges is generally a good idea.
Contributor guide
Assessment
This issue has not been assessed yet.