@@ -21,7 +21,6 @@ import (
2121 ctlrZap "sigs.k8s.io/controller-runtime/pkg/log/zap"
2222
2323 "github.com/nginx/nginx-gateway-fabric/internal/framework/file"
24- "github.com/nginx/nginx-gateway-fabric/internal/mode/provisioner"
2524 "github.com/nginx/nginx-gateway-fabric/internal/mode/static"
2625 "github.com/nginx/nginx-gateway-fabric/internal/mode/static/config"
2726 "github.com/nginx/nginx-gateway-fabric/internal/mode/static/licensing"
@@ -53,7 +52,7 @@ func createRootCommand() *cobra.Command {
5352 return rootCmd
5453}
5554
56- func createStaticModeCommand () * cobra.Command {
55+ func createControllerCommand () * cobra.Command {
5756 // flag names
5857 const (
5958 gatewayFlag = "gateway"
@@ -145,8 +144,8 @@ func createStaticModeCommand() *cobra.Command {
145144 )
146145
147146 cmd := & cobra.Command {
148- Use : "static-mode " ,
149- Short : "Configure NGINX in the scope of a single Gateway resource " ,
147+ Use : "controller " ,
148+ Short : "Run the NGINX Gateway Fabric control plane " ,
150149 RunE : func (cmd * cobra.Command , _ []string ) error {
151150 atom := zap .NewAtomicLevel ()
152151
@@ -155,7 +154,7 @@ func createStaticModeCommand() *cobra.Command {
155154
156155 commit , date , dirty := getBuildInfo ()
157156 logger .Info (
158- "Starting NGINX Gateway Fabric in static mode " ,
157+ "Starting the NGINX Gateway Fabric control plane " ,
159158 "version" , version ,
160159 "commit" , commit ,
161160 "date" , date ,
@@ -443,56 +442,6 @@ func createStaticModeCommand() *cobra.Command {
443442 return cmd
444443}
445444
446- func createProvisionerModeCommand () * cobra.Command {
447- var (
448- gatewayCtlrName = stringValidatingValue {
449- validator : validateGatewayControllerName ,
450- }
451- gatewayClassName = stringValidatingValue {
452- validator : validateResourceName ,
453- }
454- )
455-
456- cmd := & cobra.Command {
457- Use : "provisioner-mode" ,
458- Short : "Provision a static-mode NGINX Gateway Fabric Deployment per Gateway resource" ,
459- Hidden : true ,
460- RunE : func (_ * cobra.Command , _ []string ) error {
461- logger := ctlrZap .New ()
462- commit , date , dirty := getBuildInfo ()
463- logger .Info (
464- "Starting NGINX Gateway Fabric Provisioner" ,
465- "version" , version ,
466- "commit" , commit ,
467- "date" , date ,
468- "dirty" , dirty ,
469- )
470-
471- return provisioner .StartManager (provisioner.Config {
472- Logger : logger ,
473- GatewayClassName : gatewayClassName .value ,
474- GatewayCtlrName : gatewayCtlrName .value ,
475- })
476- },
477- }
478-
479- cmd .Flags ().Var (
480- & gatewayCtlrName ,
481- gatewayCtlrNameFlag ,
482- fmt .Sprintf (gatewayCtlrNameUsageFmt , domain ),
483- )
484- utilruntime .Must (cmd .MarkFlagRequired (gatewayCtlrNameFlag ))
485-
486- cmd .Flags ().Var (
487- & gatewayClassName ,
488- gatewayClassFlag ,
489- gatewayClassNameUsage ,
490- )
491- utilruntime .Must (cmd .MarkFlagRequired (gatewayClassFlag ))
492-
493- return cmd
494- }
495-
496445// FIXME(pleshakov): Remove this command once NGF min supported Kubernetes version supports sleep action in
497446// preStop hook.
498447// See https://github.com/kubernetes/enhancements/tree/4ec371d92dcd4f56a2ab18c8ba20bb85d8d20efe/keps/sig-node/3960-pod-lifecycle-sleep-action
0 commit comments