Merge pull request #89551 from zlabjp/restore-kubectl-prune-multiple-namespaces

Restore the ability to `kubectl apply --prune` without -n flag
This commit is contained in:
Kubernetes Prow Robot
2020-04-09 07:49:43 -07:00
committed by GitHub
2 changed files with 24 additions and 3 deletions

View File

@@ -77,9 +77,6 @@ func (p *pruner) pruneAll(o *ApplyOptions) error {
}
for n := range p.visitedNamespaces {
if len(o.Namespace) != 0 && n != o.Namespace {
continue
}
for _, m := range namespacedRESTMappings {
if err := p.prune(n, m); err != nil {
return fmt.Errorf("error pruning namespaced object %v: %v", m.GroupVersionKind, err)