This helps to shorten the time to change ownership and permission of a volume.
When you have lots of files in the volume, it could fail to mount with timed out waiting for the condition error.
This change should help resolve it.
OnRootMismatch: Only change permissions and ownership if the permission and the ownership of root directory does not match with expected permissions of the volume. This could help shorten the time it takes to change ownership and permission of a volume.
This helps to shorten the time to change ownership and permission of a volume. When you have lots of files in the volume, it could fail to mount with
timed out waiting for the condition
error. This change should help resolve it.Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#configure-volume-permission-and-ownership-change-policy-for-pods