Skip to content

Commit

Permalink
new versions cant rollout if older version has the lock (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamrai1993 authored Jan 2, 2025
1 parent 7bd4f5c commit 3c2e568
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions operator/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,12 @@ func mainWithError() error {
sentry.CaptureException(err)
return fmt.Errorf("main: %w", err)
}
if err := mgr.AddReadyzCheck("readyz", leaderReadinessCheck(mgr)); err != nil {
// if err := mgr.AddReadyzCheck("readyz", leaderReadinessCheck(mgr)); err != nil {
// setupLog.Error(err, "unable to set up ready check")
// sentry.CaptureException(err)
// return fmt.Errorf("main: %w", err)
// }
if err := mgr.AddReadyzCheck("readyz", healthz.Ping); err != nil {
setupLog.Error(err, "unable to set up ready check")
sentry.CaptureException(err)
return fmt.Errorf("main: %w", err)
Expand All @@ -226,7 +231,7 @@ func mainWithError() error {
return nil
}

func leaderReadinessCheck(mgr ctrl.Manager) healthz.Checker {
func _(mgr ctrl.Manager) healthz.Checker {
return func(req *http.Request) error {
select {
case <-mgr.Elected():
Expand Down

0 comments on commit 3c2e568

Please sign in to comment.