Skip to content

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

@amalsom10

Description

@amalsom10

Is your feature request related to a problem? Please describe.
When hostPath.chown=true, the pod can get stuck in init with:

chown: /data: Permission denied

The chart docs say this init container should run with root permissions, but currently it inherits the non-root container security context.

Describe the solution you'd like
Use an explicit root securityContext for the hostpath-chown init container only.

Also set ownership as uid:gid so user and group are both aligned with runtime values.

Describe alternatives you've considered
As a workaround, pre-create the host path with the right ownership and set hostPath.chown=false, but that is extra manual work and easy to miss.

Additional context
Related fix PR: #395

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions