sync api/v1/pod/util with api/pod/util and remove DefaultContainers

This commit is contained in:
Shihang Zhang
2020-03-20 10:21:24 -07:00
parent 91766b86a9
commit b56da85a77
14 changed files with 350 additions and 224 deletions

View File

@@ -592,7 +592,7 @@ func GetPodVolumeNames(pod *v1.Pod) (mounts sets.String, devices sets.String) {
mounts = sets.NewString()
devices = sets.NewString()
podutil.VisitContainers(&pod.Spec, func(container *v1.Container) bool {
podutil.VisitContainers(&pod.Spec, podutil.AllFeatureEnabledContainers(), func(container *v1.Container, containerType podutil.ContainerType) bool {
if container.VolumeMounts != nil {
for _, mount := range container.VolumeMounts {
mounts.Insert(mount.Name)