Skip to content

Commit

Permalink
fix(kubernetes resource): retry on resource not found
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Nov 21, 2024
1 parent 16e5a73 commit 6374e28
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions checks/kubernetes_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ func (c *KubernetesResourceChecker) evalWaitFor(ctx context.Context, check v1.Ku

resourceObjs, err := ctx.KubernetesDynamicClient().FetchResources(ctx, append(check.StaticResources, check.Resources...)...)
if err != nil {
if apiErrors.IsNotFound(err) {
return retry.RetryableError(err)
}

return fmt.Errorf("wait for evaluation. fetching resources: %w", err)
} else if len(resourceObjs) != check.TotalResources() {
var got []string
Expand Down

0 comments on commit 6374e28

Please sign in to comment.