Skip to content

Commit

Permalink
fix: add upstream TLS check to readiness probe
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Ritter <[email protected]>
  • Loading branch information
Benjamin Ritter committed Jan 15, 2025
1 parent 8b6b614 commit f7fa54d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,16 @@ func innerMain() int {
}
}

// Always enable downstream checking for the webhooks, if enabled.
if len(webhooks) > 0 {
tlsChecker := webhook.NewTLSChecker(*certDir, *port)
setupLog.Info("setting up TLS readiness probe")
if err := mgr.AddReadyzCheck("tls-check", tlsChecker); err != nil {
setupLog.Error(err, "unable to create tls readiness check")
return 1
}
}

// Setup controllers asynchronously, they will block for certificate generation if needed.
setupErr := make(chan error)
ctx := ctrl.SetupSignalHandler()
Expand Down

0 comments on commit f7fa54d

Please sign in to comment.