Skip to content

[stable/redis-ha] fix hostPath chown init container permissions#395

Open
amalsom10 wants to merge 2 commits intoDandyDeveloper:masterfrom
amalsom10:fix/redis-ha-hostpath-chown-root
Open

[stable/redis-ha] fix hostPath chown init container permissions#395
amalsom10 wants to merge 2 commits intoDandyDeveloper:masterfrom
amalsom10:fix/redis-ha-hostpath-chown-root

Conversation

@amalsom10
Copy link
Copy Markdown

@amalsom10 amalsom10 commented Mar 31, 2026

What this PR does / why we need it:

When hostPath.chown=true, hostpath-chown could fail with chown: /data: Permission denied because it inherited non-root container security settings. This PR makes that init container explicitly root-only for the ownership change step, keeps allowPrivilegeEscalation: false, and sets ownership as uid:gid.

Which issue this PR fixes

Special notes for your reviewer:

  • This is intentionally scoped to the hostpath-chown init container only; main Redis/Sentinel containers remain non-root.
  • Chart version is bumped to include this fix.

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [stable/mychartname])

Run the hostpath-chown init container with an explicit root securityContext so hostPath ownership changes work as documented. Also set ownership as uid:gid and keep imagePullPolicy aligned with other init containers.

Made-with: Cursor
Signed-off-by: amalsom10 <asoman@verticalscope.com>
Bump redis-ha chart version to include the hostPath chown init-container permission fix in this PR.

Signed-off-by: amalsom10 <asoman@verticalscope.com>
Made-with: Cursor
Signed-off-by: amalsom10 <asoman@verticalscope.com>
@amalsom10 amalsom10 force-pushed the fix/redis-ha-hostpath-chown-root branch from a65117b to f954fab Compare March 31, 2026 05:54
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.

[chart/redis-ha] hostPath.chown init container fails because non-root securityContext prevents chown

1 participant