@@ -37,7 +37,6 @@ import (
37
37
"sigs.k8s.io/controller-runtime/pkg/cache"
38
38
"sigs.k8s.io/controller-runtime/pkg/client"
39
39
"sigs.k8s.io/controller-runtime/pkg/event"
40
- "sigs.k8s.io/controller-runtime/pkg/healthz"
41
40
"sigs.k8s.io/controller-runtime/pkg/log/zap"
42
41
"sigs.k8s.io/controller-runtime/pkg/manager"
43
42
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
@@ -70,7 +69,6 @@ func init() {
70
69
func main () {
71
70
var (
72
71
metricsAddr string
73
- probeAddr string
74
72
logLevel string
75
73
nodeName string
76
74
namespace string
@@ -84,7 +82,6 @@ func main() {
84
82
)
85
83
86
84
flag .StringVar (& metricsAddr , "metrics-bind-address" , "127.0.0.1:7572" , "The address the metric endpoint binds to." )
87
- flag .StringVar (& probeAddr , "health-probe-bind-address" , "127.0.0.1:8081" , "The address the probe endpoint binds to." )
88
85
flag .StringVar (& logLevel , "log-level" , "info" , fmt .Sprintf ("log level. must be one of: [%s]" , logging .Levels .String ()))
89
86
flag .StringVar (& nodeName , "node-name" , "" , "The node this daemon is running on." )
90
87
flag .StringVar (& namespace , "namespace" , "" , "The namespace this daemon is deployed in" )
@@ -114,7 +111,7 @@ func main() {
114
111
115
112
mgr , err := ctrl .NewManager (ctrl .GetConfigOrDie (), ctrl.Options {
116
113
Scheme : scheme ,
117
- HealthProbeBindAddress : probeAddr ,
114
+ HealthProbeBindAddress : "" , // we use the metrics endpoint for healthchecks
118
115
Cache : cache.Options {
119
116
ByObject : map [client.Object ]cache.ByObject {
120
117
& corev1.Secret {}: namespaceSelector ,
@@ -139,15 +136,6 @@ func main() {
139
136
140
137
//+kubebuilder:scaffold:builder
141
138
142
- if err := mgr .AddHealthzCheck ("healthz" , healthz .Ping ); err != nil {
143
- setupLog .Error (err , "unable to set up health check" )
144
- os .Exit (1 )
145
- }
146
- if err := mgr .AddReadyzCheck ("readyz" , healthz .Ping ); err != nil {
147
- setupLog .Error (err , "unable to set up ready check" )
148
- os .Exit (1 )
149
- }
150
-
151
139
enableWebhook := webhookMode == "onlywebhook"
152
140
startListeners := make (chan struct {})
153
141
if enableWebhook && ! disableCertRotation {
0 commit comments