Skip to content

Commit

Permalink
Trigger reconciliation every 30 seconds if failed to start NATS (#18183)
Browse files Browse the repository at this point in the history
* Trigger reconciliation every 30 seconds if failed to start NATS controller

* image bump

* fix lint
  • Loading branch information
mfaizanse authored Sep 15, 2023
1 parent 128f12d commit 13242b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"
"os"
"time"

"github.com/pkg/errors"
"go.uber.org/zap"
Expand Down Expand Up @@ -64,6 +65,8 @@ const (
secretKeyClientSecret = "client_secret"
secretKeyTokenURL = "token_url"
secretKeyCertsURL = "certs_url"

reconcileInterval = 30 * time.Second
)

var (
Expand Down Expand Up @@ -212,7 +215,8 @@ func (r *Reconciler) reconcileNATSBackend(ctx context.Context, backendStatus *ev
if updateErr := r.syncBackendStatus(ctx, backendStatus, nil); updateErr != nil {
return ctrl.Result{}, errors.Wrapf(err, "failed to update status while starting NATS controller")
}
return ctrl.Result{}, err
r.namedLogger().Errorf("failed to start NATS controller: %v", err)
return ctrl.Result{RequeueAfter: reconcileInterval}, nil
}

// Delete secret for publisher proxy if it exists
Expand Down
2 changes: 1 addition & 1 deletion resources/eventing/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ global:
images:
eventing_controller:
name: eventing-controller
version: PR-18175
version: PR-18183
directory: dev
pullPolicy: "IfNotPresent"
publisher_proxy:
Expand Down

0 comments on commit 13242b5

Please sign in to comment.