func deleteDaemonSets(expClient client.ExtensionsInterface, ns string) error { items, err := expClient.DaemonSets(ns).List(unversioned.ListOptions{}) if err != nil { return err } for i := range items.Items { err := expClient.DaemonSets(ns).Delete(items.Items[i].Name) if err != nil && !errors.IsNotFound(err) { return err } } return nil }
func deleteDaemonSets(expClient client.ExtensionsInterface, ns string) error { items, err := expClient.DaemonSets(ns).List(labels.Everything(), fields.Everything()) if err != nil { return err } for i := range items.Items { err := expClient.DaemonSets(ns).Delete(items.Items[i].Name) if err != nil && !errors.IsNotFound(err) { return err } } return nil }