File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -24,21 +24,16 @@ import (
2424 _ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
2525
2626 ctrl "sigs.k8s.io/controller-runtime"
27- "sigs.k8s.io/controller-runtime/pkg/builder"
2827 "sigs.k8s.io/controller-runtime/pkg/client/config"
2928 "sigs.k8s.io/controller-runtime/pkg/handler"
30- "sigs.k8s.io/controller-runtime/pkg/log"
3129 "sigs.k8s.io/controller-runtime/pkg/log/zap"
3230 "sigs.k8s.io/controller-runtime/pkg/manager"
3331 "sigs.k8s.io/controller-runtime/pkg/manager/signals"
3432 "sigs.k8s.io/controller-runtime/pkg/source"
3533)
3634
37- func init () {
38- log .SetLogger (zap .New ())
39- }
40-
4135func main () {
36+ ctrl .SetLogger (zap .New ())
4237 entryLog := ctrl .Log .WithName ("entrypoint" )
4338
4439 // Setup a Manager
@@ -65,7 +60,7 @@ func main() {
6560 os .Exit (1 )
6661 }
6762
68- if err := builder . WebhookManagedBy (mgr ).
63+ if err := ctrl . NewWebhookManagedBy (mgr ).
6964 For (& corev1.Pod {}).
7065 WithDefaulter (& podAnnotator {}).
7166 WithValidator (& podValidator {}).
You can’t perform that action at this time.
0 commit comments