Files
kubernetes/pkg
Kubernetes Submit Queue 816f8e29d8 Merge pull request #45623 from wongma7/subpath-file
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
```
2017-05-12 14:55:45 -07:00
..
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-05-10 01:50:38 +08:00
2017-05-11 18:17:33 +08:00
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-05-01 16:43:50 -07:00
2017-04-14 10:40:57 -07:00
2017-04-25 11:23:33 -07:00
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00
2017-05-08 18:07:02 +08:00
2017-04-14 10:40:57 -07:00
2017-04-14 10:40:57 -07:00