mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-30 05:43:58 +00:00
Automatic merge from submit-queue Don't attempt to make and chmod subPath if it already exists fixes https://github.com/kubernetes/kubernetes/issues/45613 https://github.com/kubernetes/kubernetes/pull/43775 fixed one bug and introduced another... I overlooked that subPaths can be files, in which case MkDirAll will simply fail and the pod will not able to start. Regardless of whether it is a directory or a file, there is no need to introduce the MkdirAll->Chmod procedure if it exists, because if it exists, it should already have the correct permissions. This needs to be cherry-picked into 1.6. ```release-note Fix pods failing to start if they specify a file as a volume subPath to mount ```