File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ import (
47
47
clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4"
48
48
ctrl "sigs.k8s.io/controller-runtime"
49
49
"sigs.k8s.io/controller-runtime/pkg/controller"
50
+ "sigs.k8s.io/controller-runtime/pkg/healthz"
50
51
// +kubebuilder:scaffold:imports
51
52
)
52
53
@@ -201,12 +202,12 @@ func main() {
201
202
202
203
// +kubebuilder:scaffold:builder
203
204
204
- if err := mgr .AddReadyzCheck ("webhook " , mgr . GetWebhookServer (). StartedChecker () ); err != nil {
205
+ if err := mgr .AddReadyzCheck ("ping " , healthz . Ping ); err != nil {
205
206
setupLog .Error (err , "unable to create ready check" )
206
207
os .Exit (1 )
207
208
}
208
209
209
- if err := mgr .AddHealthzCheck ("webhook " , mgr . GetWebhookServer (). StartedChecker () ); err != nil {
210
+ if err := mgr .AddHealthzCheck ("ping " , healthz . Ping ); err != nil {
210
211
setupLog .Error (err , "unable to create health check" )
211
212
os .Exit (1 )
212
213
}
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ import (
51
51
clusterv1exp "sigs.k8s.io/cluster-api/exp/api/v1alpha4"
52
52
ctrl "sigs.k8s.io/controller-runtime"
53
53
"sigs.k8s.io/controller-runtime/pkg/controller"
54
+ "sigs.k8s.io/controller-runtime/pkg/healthz"
54
55
// +kubebuilder:scaffold:imports
55
56
)
56
57
@@ -240,12 +241,12 @@ func main() {
240
241
241
242
// +kubebuilder:scaffold:builder
242
243
243
- if err := mgr .AddReadyzCheck ("webhook " , mgr . GetWebhookServer (). StartedChecker () ); err != nil {
244
+ if err := mgr .AddReadyzCheck ("ping " , healthz . Ping ); err != nil {
244
245
setupLog .Error (err , "unable to create ready check" )
245
246
os .Exit (1 )
246
247
}
247
248
248
- if err := mgr .AddHealthzCheck ("webhook " , mgr . GetWebhookServer (). StartedChecker () ); err != nil {
249
+ if err := mgr .AddHealthzCheck ("ping " , healthz . Ping ); err != nil {
249
250
setupLog .Error (err , "unable to create health check" )
250
251
os .Exit (1 )
251
252
}
You can’t perform that action at this time.
0 commit comments