INNER CODE UNIT · Go
tlsChecker
open-policy-agent/gatekeeper · main.go:339
tlsChecker := webhook.NewTLSChecker(*certDir, *host, *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
}
// only setup healthcheck when flag is set
if *enableTLSHealthcheck {
setupLog.Info("setting up TLS healthcheck probe")
if err := mgr.AddHealthzCheck("tls-check", tlsChecker); err != nil {
setupLog.Error(err, "unable to create tls health check")
return 1
}
}
}
// Setup controllers asynchronously, they will block for certificate generation if needed.