@@ -103,18 +103,19 @@ var (
103103 diagnosticsOptions = flags.DiagnosticsOptions {}
104104 logOptions = logs .NewOptions ()
105105 // core Cluster API specific flags.
106- clusterTopologyConcurrency int
107- clusterCacheTrackerConcurrency int
108- clusterClassConcurrency int
109- clusterConcurrency int
110- extensionConfigConcurrency int
111- machineConcurrency int
112- machineSetConcurrency int
113- machineDeploymentConcurrency int
114- machinePoolConcurrency int
115- clusterResourceSetConcurrency int
116- machineHealthCheckConcurrency int
117- nodeDrainClientTimeout time.Duration
106+ clusterTopologyConcurrency int
107+ clusterCacheTrackerConcurrency int
108+ clusterClassConcurrency int
109+ clusterConcurrency int
110+ extensionConfigConcurrency int
111+ machineConcurrency int
112+ machineSetConcurrency int
113+ machineDeploymentConcurrency int
114+ machinePoolConcurrency int
115+ clusterResourceSetConcurrency int
116+ machineHealthCheckConcurrency int
117+ nodeDrainClientTimeout time.Duration
118+ useDeprecatedInfraMachineNaming bool
118119)
119120
120121func init () {
@@ -229,6 +230,10 @@ func InitFlags(fs *pflag.FlagSet) {
229230 fs .StringVar (& healthAddr , "health-addr" , ":9440" ,
230231 "The address the health endpoint binds to." )
231232
233+ fs .BoolVar (& useDeprecatedInfraMachineNaming , "use-deprecated-infra-machine-naming" , false ,
234+ "Use deprecated infrastructure machine naming" )
235+ _ = fs .MarkDeprecated ("use-deprecated-infra-machine-naming" , "This flag will be removed in v1.9." )
236+
232237 flags .AddDiagnosticsOptions (fs , & diagnosticsOptions )
233238 flags .AddTLSOptions (fs , & tlsOptions )
234239
@@ -516,11 +521,12 @@ func setupReconcilers(ctx context.Context, mgr ctrl.Manager) webhooks.ClusterCac
516521 os .Exit (1 )
517522 }
518523 if err := (& controllers.MachineSetReconciler {
519- Client : mgr .GetClient (),
520- UnstructuredCachingClient : unstructuredCachingClient ,
521- APIReader : mgr .GetAPIReader (),
522- Tracker : tracker ,
523- WatchFilterValue : watchFilterValue ,
524+ Client : mgr .GetClient (),
525+ UnstructuredCachingClient : unstructuredCachingClient ,
526+ APIReader : mgr .GetAPIReader (),
527+ Tracker : tracker ,
528+ WatchFilterValue : watchFilterValue ,
529+ DeprecatedInfraMachineNaming : useDeprecatedInfraMachineNaming ,
524530 }).SetupWithManager (ctx , mgr , concurrency (machineSetConcurrency )); err != nil {
525531 setupLog .Error (err , "unable to create controller" , "controller" , "MachineSet" )
526532 os .Exit (1 )
0 commit comments