Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Support running of services as application users #79

@lfrancke

Description

@lfrancke

Currently all our managed processes (e.g. ZooKeeper) are started as root.
We'd like to support also running all our services as non-root.

We'd like to let the user choose the username the services should run as.
So the CRDs need to be extended (but that's for operator specific issues).

We will follow what the systemk does which means that the Agent will need to look in each Pod for the desired username.

This is the field where the name can be found: pod.securityContext.windowsOptions.runAsUserName
Note: There is also a pod.securityContext.runAsUser field but that only takes an integer which is not enough for us.

  • The agent needs to be extended to read the aforementioned property
  • The username then needs to be propagated to the systemd unit
  • Optional/Bonus: If the user does not exist it can be created automatically
    • If this is implemented it should be an optional feature, the Agent should have a configuration option disabling auto-creation of users
  • When the agent creates directories for the services (via Volumes) they need to be owned by the same user
    • This might also be made configurable later but that's for another issue

Note: This is not about running the Agent itself as non-root!

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions