Skip to content

Commit

Permalink
fix(kubernetes-resource): handle default display template error in ca…
Browse files Browse the repository at this point in the history
…se of timeout
  • Loading branch information
yashmehrotra authored and moshloop committed Oct 23, 2024
1 parent d08c6fa commit 4662c9f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions checks/kubernetes_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ func (c *KubernetesResourceChecker) Check(ctx context.Context, check v1.Kubernet
backoff = retry.WithMaxDuration(maxRetryTimeout, backoff)
}

// We do this before virtual check run in case the check times out
// and returns an err, the default templating requires 'display' in env
result.AddData(map[string]any{
"display": make(map[string]any),
})

retryErr := retry.Do(ctx, backoff, func(_ctx gocontext.Context) error {
ctx.Logger.V(4).Infof("running check: %s", virtualCanary.Name)

Expand Down

0 comments on commit 4662c9f

Please sign in to comment.