Skip to content

Commit bba6342

Browse files
Benjamin Ritterl0wl3vel
Benjamin Ritter
authored andcommitted
fix: add upstream TLS check to readiness probe
Signed-off-by: Benjamin Ritter <[email protected]>
1 parent cb9f008 commit bba6342

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

main.go

+10
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,16 @@ func innerMain() int {
308308
}
309309
}
310310

311+
// Always enable downstream checking for the webhooks, if enabled.
312+
if len(webhooks) > 0 {
313+
tlsChecker := webhook.NewTLSChecker(*certDir, *port)
314+
setupLog.Info("setting up TLS readiness probe")
315+
if err := mgr.AddReadyzCheck("tls-check", tlsChecker); err != nil {
316+
setupLog.Error(err, "unable to create tls readiness check")
317+
return 1
318+
}
319+
}
320+
311321
// Setup controllers asynchronously, they will block for certificate generation if needed.
312322
setupErr := make(chan error)
313323
ctx := ctrl.SetupSignalHandler()

0 commit comments

Comments
 (0)