Skip to content

volume-mount-hack hands on big folder #1214

@zakkg3

Description

@zakkg3

chown the whole directory makes it hang for loong time, even if most of the directoryu is already 1000:1000.


      securityContext:
        fsGroup: 1000
        fsGroupChangePolicy: "OnRootMismatch"

should fix the issue.

When configuring a pod’s security context, set fsGroupChangePolicy to "OnRootMismatch" so if the root of the volume already has the correct permissions, the recursive permission change can be skipped. Kubernetes ensures that permissions of the top-level directory are changed last the first time it applies permissions

https://kubernetes.io/blog/2020/12/14/kubernetes-release-1.20-fsgroupchangepolicy-fsgrouppolicy/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions