Skip to content

Commit

Permalink
Move changes to cmd/options.go
Browse files Browse the repository at this point in the history
  • Loading branch information
p-se committed Jul 3, 2024
1 parent f3319b5 commit a41fc72
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions internal/cmd/controller/gitops/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (

command "github.com/rancher/fleet/internal/cmd"
"github.com/rancher/fleet/internal/cmd/controller/gitops/reconciler"
"github.com/rancher/fleet/internal/cmd/controller/options"
"github.com/rancher/fleet/internal/metrics"
fleet "github.com/rancher/fleet/pkg/apis/fleet.cattle.io/v1alpha1"
"github.com/rancher/fleet/pkg/git/poll"
Expand Down Expand Up @@ -87,7 +86,7 @@ func (g *GitOperator) Run(cmd *cobra.Command, args []string) error {

namespace := g.Namespace

leaderOpts, err := options.NewLeaderElectionOptions()
leaderOpts, err := command.NewLeaderElectionOptions()
if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions internal/cmd/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/reugn/go-quartz/quartz"

"github.com/rancher/fleet/internal/cmd/controller/options"
"github.com/rancher/fleet/internal/cmd"
"github.com/rancher/fleet/internal/cmd/controller/reconciler"
"github.com/rancher/fleet/internal/cmd/controller/target"
"github.com/rancher/fleet/internal/manifest"
Expand Down Expand Up @@ -36,7 +36,7 @@ func start(
ctx context.Context,
systemNamespace string,
config *rest.Config,
leaderOpts options.LeaderElectionOptions,
leaderOpts cmd.LeaderElectionOptions,
workersOpts ControllerReconcilerWorkers,
bindAddresses BindAddresses,
disableMetrics bool,
Expand Down
3 changes: 1 addition & 2 deletions internal/cmd/controller/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"github.com/rancher/fleet/internal/cmd/controller/agentmanagement"
"github.com/rancher/fleet/internal/cmd/controller/agentmanagement/agent"
"github.com/rancher/fleet/internal/cmd/controller/gitops"
"github.com/rancher/fleet/internal/cmd/controller/options"

"github.com/spf13/cobra"

Expand Down Expand Up @@ -81,7 +80,7 @@ func (f *FleetManager) Run(cmd *cobra.Command, args []string) error {
kubeconfig := ctrl.GetConfigOrDie()
workersOpts := ControllerReconcilerWorkers{}

leaderOpts, err := options.NewLeaderElectionOptions()
leaderOpts, err := command.NewLeaderElectionOptions()
if err != nil {
return err
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package options
package cmd

import (
"fmt"
Expand Down

0 comments on commit a41fc72

Please sign in to comment.