@@ -27,7 +27,6 @@ import (
2727
2828 "k8s.io/apimachinery/pkg/runtime"
2929 utilruntime "k8s.io/apimachinery/pkg/util/runtime"
30- utilfeature "k8s.io/apiserver/pkg/util/feature"
3130 clientgoscheme "k8s.io/client-go/kubernetes/scheme"
3231 ctrl "sigs.k8s.io/controller-runtime"
3332 "sigs.k8s.io/controller-runtime/pkg/certwatcher"
@@ -78,7 +77,6 @@ func main() {
7877 var enableHTTP2 bool
7978 var sliceHealthNodeAffinityMode string
8079 var tlsOpts []func (* tls.Config )
81- var featureGates string
8280 flag .StringVar (& metricsAddr , "metrics-bind-address" , "0" , "The address the metrics endpoint binds to. " +
8381 "Use :8443 for HTTPS or :8080 for HTTP, or leave as 0 to disable the metrics service." )
8482 flag .StringVar (& probeAddr , "health-probe-bind-address" , ":8081" , "The address the probe endpoint binds to." )
@@ -101,20 +99,12 @@ func main() {
10199 "If set, HTTP/2 will be enabled for the metrics and webhook servers" )
102100 flag .StringVar (& sliceHealthNodeAffinityMode , "default-slice-health-node-affinity" , "HEALTHY" ,
103101 "Default slice health node affinity. Possible values are HEALTHY or HEALTHY_AND_DEGRADED." )
104- flag .StringVar (& featureGates , "feature-gates" , "" , "A set of key=value pairs that describe feature gates for alpha/experimental features." )
105102 opts := zap.Options {
106103 Development : true ,
107104 }
108105 opts .BindFlags (flag .CommandLine )
109106 flag .Parse ()
110107
111- if featureGates != "" {
112- if err := utilfeature .DefaultMutableFeatureGate .Set (featureGates ); err != nil {
113- setupLog .Error (err , "Unable to set flag gates for known features" )
114- os .Exit (1 )
115- }
116- }
117-
118108 var sliceHealthValues []string
119109 switch sliceHealthNodeAffinityMode {
120110 case "HEALTHY" :
@@ -294,10 +284,6 @@ func setupControllers(mgr ctrl.Manager, certsReady chan struct{}, activationTime
294284 setupLog .Error (err , "Unable to create webhook" , "webhook" , "Job" )
295285 os .Exit (1 )
296286 }
297- if err := webhooks .SetupPodWebhookWithManager (mgr ); err != nil {
298- setupLog .Error (err , "Unable to create webhook" , "webhook" , "Pod" )
299- os .Exit (1 )
300- }
301287
302288 if failedCtrl , err := controller .SetupControllers (mgr , controller.Options {
303289 ActivationTimeout : activationTimeout , RetryDelayOnSliceFailure : retryDelay }); err != nil {
0 commit comments