Skip to content

Commit 4cf5cdc

Browse files
committed
fix: duplicate flag declarations
We no longer have handler specific flags, so no need to call AddFlags()
1 parent 9c5c78d commit 4cf5cdc

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

pkg/handlers/nutanix/handlers.go

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,19 @@ import (
88
"sigs.k8s.io/controller-runtime/pkg/manager"
99

1010
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/common/pkg/capi/clustertopology/handlers"
11-
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/mutation/controlplanevirtualip"
1211
nutanixclusterconfig "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/nutanix/clusterconfig"
1312
nutanixmutation "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/nutanix/mutation"
1413
nutanixworkerconfig "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/nutanix/workerconfig"
1514
"github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/options"
1615
nutanixmutationvprev "github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/pkg/handlers/v3/nutanix/mutation"
1716
)
1817

19-
type Handlers struct {
20-
// kubeVIPConfig holds the configuration for the kube-vip control-plane virtual IP.
21-
controlPlaneVirtualIPConfig *controlplanevirtualip.Config
22-
}
18+
type Handlers struct{}
2319

2420
func New(
25-
globalOptions *options.GlobalOptions,
21+
_ *options.GlobalOptions,
2622
) *Handlers {
27-
return &Handlers{
28-
controlPlaneVirtualIPConfig: &controlplanevirtualip.Config{GlobalOptions: globalOptions},
29-
}
23+
return &Handlers{}
3024
}
3125

3226
func (h *Handlers) AllHandlers(mgr manager.Manager) []handlers.Named {
@@ -40,6 +34,4 @@ func (h *Handlers) AllHandlers(mgr manager.Manager) []handlers.Named {
4034
}
4135
}
4236

43-
func (h *Handlers) AddFlags(flagSet *pflag.FlagSet) {
44-
h.controlPlaneVirtualIPConfig.AddFlags(flagSet)
45-
}
37+
func (h *Handlers) AddFlags(_ *pflag.FlagSet) {}

0 commit comments

Comments
 (0)