mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
kubectl: do not cascade deletion for overlapping deployments
This commit is contained in:
parent
f2ae192e3a
commit
8351450a22
@ -436,6 +436,11 @@ func (reaper *DeploymentReaper) Stop(namespace, name string, timeout time.Durati
|
||||
return err
|
||||
}
|
||||
|
||||
// Do not cascade deletion for overlapping deployments.
|
||||
if len(deployment.Annotations[deploymentutil.OverlapAnnotation]) > 0 {
|
||||
return deployments.Delete(name, nil)
|
||||
}
|
||||
|
||||
// Stop all replica sets.
|
||||
selector, err := unversioned.LabelSelectorAsSelector(deployment.Spec.Selector)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user