diff --git a/pkg/staticpod/staticpod.go b/pkg/staticpod/staticpod.go index ec687f91e5..03688012ba 100644 --- a/pkg/staticpod/staticpod.go +++ b/pkg/staticpod/staticpod.go @@ -336,9 +336,9 @@ func addVolumes(p *v1.Pod, src []string, volume typeVolume) { } func addExtraMounts(p *v1.Pod, extraMounts []string) { - var sourceType v1.HostPathType for i, rawMount := range extraMounts { + var sourceType v1.HostPathType = v1.HostPathUnset // Reset sourceType for each mount mount := strings.Split(rawMount, ":") var ro bool switch len(mount) {