mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
kubectl: notfound errors should not error out
This commit is contained in:
parent
77d6e5578e
commit
36522378f4
@ -397,9 +397,10 @@ func (reaper *DeploymentReaper) Stop(namespace, name string, timeout time.Durati
|
||||
for _, rc := range rsList.Items {
|
||||
if err := rsReaper.Stop(rc.Namespace, rc.Name, timeout, gracePeriod); err != nil {
|
||||
scaleGetErr, ok := err.(*ScaleError)
|
||||
if !errors.IsNotFound(err) || ok && !errors.IsNotFound(scaleGetErr.ActualError) {
|
||||
errList = append(errList, err)
|
||||
if errors.IsNotFound(err) || (ok && errors.IsNotFound(scaleGetErr.ActualError)) {
|
||||
continue
|
||||
}
|
||||
errList = append(errList, err)
|
||||
}
|
||||
}
|
||||
if len(errList) > 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user