Skip to content

[DPE-10291]: rootless k8s#75

Open
skourta wants to merge 2 commits into
9/edgefrom
dpe-10291-rootless
Open

[DPE-10291]: rootless k8s#75
skourta wants to merge 2 commits into
9/edgefrom
dpe-10291-rootless

Conversation

@skourta

@skourta skourta commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces and tests support for running the Valkey charm and its workload container as a non-root user. It updates configuration, file paths, and adds comprehensive integration tests to verify rootless operation and related behaviors.

Rootless operation and security improvements:

  • The metadata.yaml is updated to specify charm-user: non-root, and the valkey container is explicitly configured to run as a dedicated non-root user and group (uid/gid 584792).
  • File paths for the topology observer log and TLS CA certificate are changed from privileged locations (/var/log, /etc/ssl/certs) to non-privileged, writable locations (charm_dir), ensuring compatibility with non-root operation.

Testing and validation:

  • A new integration test suite (test_rootless.py) is added to verify that both the charm and workload containers do not run as root, lack sudo privileges, and that all relevant files (logs, certificates) are written to non-privileged locations. The tests also verify correct behavior during TLS enablement and after failover events.

@skourta skourta marked this pull request as ready for review July 1, 2026 09:52
@skourta skourta requested review from Mehdi-Bendriss and reneradoi and removed request for reneradoi July 1, 2026 09:53
@skourta skourta force-pushed the dpe-10291-rootless branch from d816a1b to 0453bd7 Compare July 1, 2026 13:37

@reneradoi reneradoi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants