mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-12-15 20:37:39 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user