mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
Windows: Fixes subpath symlink evaluation
Paths do not always have Targets, which means that the previously added powershell command will return an empty string, causing pods with subpath mounts to fail.
This commit is contained in:
parent
43fbe17dc6
commit
15ccf86e7c
@ -55,6 +55,10 @@ func evalPath(path string) (linkedPath string, err error) {
|
||||
return "", err
|
||||
}
|
||||
linkedPath = strings.TrimSpace(string(output))
|
||||
if linkedPath == "" {
|
||||
klog.V(4).Infof("Path '%s' has no target. Consiering it as evaluated.", path)
|
||||
return path, nil
|
||||
}
|
||||
if isVolumePrefix(linkedPath) {
|
||||
return path, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user