unknown status

Signed-off-by: Austin Abro <AustinAbro321@gmail.com>
pull/13604/head
Austin Abro 9 months ago
parent 4dbdd7ce10
commit db90b17484
No known key found for this signature in database
GPG Key ID: 92EB5159E403F9D6

@ -94,17 +94,20 @@ func (w *kstatusWaiter) waitForDelete(ctx context.Context, resourceList Resource
errs := []error{} errs := []error{}
for _, id := range resources { for _, id := range resources {
rs := statusCollector.ResourceStatuses[id] rs := statusCollector.ResourceStatuses[id]
if rs.Status == status.CurrentStatus { if rs.Status == status.NotFoundStatus {
continue continue
} }
errs = append(errs, fmt.Errorf("%s: %s not ready, status: %s", rs.Identifier.Name, rs.Identifier.GroupKind.Kind, rs.Status)) if rs.Status == status.UnknownStatus {
errs = append(errs, fmt.Errorf("%s: %s cannot determine if resource exists, status: %s", rs.Identifier.Name, rs.Identifier.GroupKind.Kind, rs.Status))
continue
}
errs = append(errs, fmt.Errorf("%s: %s still exists, status: %s", rs.Identifier.Name, rs.Identifier.GroupKind.Kind, rs.Status))
} }
errs = append(errs, ctx.Err()) errs = append(errs, ctx.Err())
return errors.Join(errs...) return errors.Join(errs...)
} }
return nil return nil
defer cancel()
return nil
} }
func (w *kstatusWaiter) wait(ctx context.Context, resourceList ResourceList, waitForJobs bool) error { func (w *kstatusWaiter) wait(ctx context.Context, resourceList ResourceList, waitForJobs bool) error {

Loading…
Cancel
Save