From 1b6245b9b980d02f7a24aee61e413df6cc90299b Mon Sep 17 00:00:00 2001 From: Chris Doherty Date: Fri, 20 Oct 2023 19:58:11 -0500 Subject: [PATCH] Remove supfluous context --- cmd/eksctl-anywhere/cmd/createcluster.go | 2 +- cmd/eksctl-anywhere/cmd/deletecluster.go | 2 +- cmd/eksctl-anywhere/cmd/generatebundleconfig.go | 2 +- cmd/eksctl-anywhere/cmd/supportbundle.go | 2 +- cmd/eksctl-anywhere/cmd/upgradecluster.go | 2 +- cmd/eksctl-anywhere/cmd/upgradeplancluster.go | 2 +- cmd/eksctl-anywhere/cmd/validatecreatecluster.go | 2 +- pkg/dependencies/factory.go | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd/eksctl-anywhere/cmd/createcluster.go b/cmd/eksctl-anywhere/cmd/createcluster.go index 260f46b03aa6a..f67779f68dacc 100644 --- a/cmd/eksctl-anywhere/cmd/createcluster.go +++ b/cmd/eksctl-anywhere/cmd/createcluster.go @@ -176,7 +176,7 @@ func (cc *createClusterOptions) createCluster(cmd *cobra.Command, _ []string) er } } - factory := dependencies.ForSpec(ctx, clusterSpec).WithExecutableMountDirs(dirs...). + factory := dependencies.ForSpec(clusterSpec).WithExecutableMountDirs(dirs...). WithBootstrapper(). WithCliConfig(cliConfig). WithClusterManager(clusterSpec.Cluster, clusterManagerTimeoutOpts). diff --git a/cmd/eksctl-anywhere/cmd/deletecluster.go b/cmd/eksctl-anywhere/cmd/deletecluster.go index f653de634b443..8f9af5eaaa2fe 100644 --- a/cmd/eksctl-anywhere/cmd/deletecluster.go +++ b/cmd/eksctl-anywhere/cmd/deletecluster.go @@ -108,7 +108,7 @@ func (dc *deleteClusterOptions) deleteCluster(ctx context.Context) error { return err } - deps, err := dependencies.ForSpec(ctx, clusterSpec).WithExecutableMountDirs(dirs...). + deps, err := dependencies.ForSpec(clusterSpec).WithExecutableMountDirs(dirs...). WithBootstrapper(). WithCliConfig(cliConfig). WithClusterManager(clusterSpec.Cluster, nil). diff --git a/cmd/eksctl-anywhere/cmd/generatebundleconfig.go b/cmd/eksctl-anywhere/cmd/generatebundleconfig.go index 57ea017e02766..533b604728530 100644 --- a/cmd/eksctl-anywhere/cmd/generatebundleconfig.go +++ b/cmd/eksctl-anywhere/cmd/generatebundleconfig.go @@ -75,7 +75,7 @@ func (gsbo *generateSupportBundleOptions) generateBundleConfig(ctx context.Conte return nil, fmt.Errorf("unable to get cluster config from file: %v", err) } - deps, err := dependencies.ForSpec(ctx, clusterSpec). + deps, err := dependencies.ForSpec(clusterSpec). WithProvider(clusterConfigPath, clusterSpec.Cluster, cc.skipIpCheck, gsbo.hardwareFileName, false, gsbo.tinkerbellBootstrapIP, map[string]bool{}, nil). WithDiagnosticBundleFactory(). Build(ctx) diff --git a/cmd/eksctl-anywhere/cmd/supportbundle.go b/cmd/eksctl-anywhere/cmd/supportbundle.go index d576cfee876e3..bf9c60a3f6145 100644 --- a/cmd/eksctl-anywhere/cmd/supportbundle.go +++ b/cmd/eksctl-anywhere/cmd/supportbundle.go @@ -76,7 +76,7 @@ func (csbo *createSupportBundleOptions) createBundle(ctx context.Context, since, return fmt.Errorf("unable to get cluster config from file: %v", err) } - deps, err := dependencies.ForSpec(ctx, clusterSpec). + deps, err := dependencies.ForSpec(clusterSpec). WithProvider(csbo.fileName, clusterSpec.Cluster, cc.skipIpCheck, csbo.hardwareFileName, false, csbo.tinkerbellBootstrapIP, map[string]bool{}, nil). WithDiagnosticBundleFactory(). Build(ctx) diff --git a/cmd/eksctl-anywhere/cmd/upgradecluster.go b/cmd/eksctl-anywhere/cmd/upgradecluster.go index 0a55d0cd091ce..6129dd012ed5e 100644 --- a/cmd/eksctl-anywhere/cmd/upgradecluster.go +++ b/cmd/eksctl-anywhere/cmd/upgradecluster.go @@ -141,7 +141,7 @@ func (uc *upgradeClusterOptions) upgradeCluster(cmd *cobra.Command, args []strin } } - factory := dependencies.ForSpec(ctx, clusterSpec).WithExecutableMountDirs(dirs...). + factory := dependencies.ForSpec(clusterSpec).WithExecutableMountDirs(dirs...). WithBootstrapper(). WithCliConfig(cliConfig). WithClusterManager(clusterSpec.Cluster, clusterManagerTimeoutOpts). diff --git a/cmd/eksctl-anywhere/cmd/upgradeplancluster.go b/cmd/eksctl-anywhere/cmd/upgradeplancluster.go index 0f163be9e4a35..60d903ce64cdc 100644 --- a/cmd/eksctl-anywhere/cmd/upgradeplancluster.go +++ b/cmd/eksctl-anywhere/cmd/upgradeplancluster.go @@ -64,7 +64,7 @@ func (uc *upgradeClusterOptions) upgradePlanCluster(ctx context.Context) error { return err } - deps, err := dependencies.ForSpec(ctx, newClusterSpec). + deps, err := dependencies.ForSpec(newClusterSpec). WithClusterManager(newClusterSpec.Cluster, nil). WithProvider(uc.fileName, newClusterSpec.Cluster, false, uc.hardwareCSVPath, uc.forceClean, uc.tinkerbellBootstrapIP, map[string]bool{}, uc.providerOptions). WithGitOpsFlux(newClusterSpec.Cluster, newClusterSpec.FluxConfig, nil). diff --git a/cmd/eksctl-anywhere/cmd/validatecreatecluster.go b/cmd/eksctl-anywhere/cmd/validatecreatecluster.go index c63855a8b2b81..21cffa03ec7e5 100644 --- a/cmd/eksctl-anywhere/cmd/validatecreatecluster.go +++ b/cmd/eksctl-anywhere/cmd/validatecreatecluster.go @@ -79,7 +79,7 @@ func (valOpt *validateOptions) validateCreateCluster(cmd *cobra.Command, _ []str if err != nil { return err } - deps, err := dependencies.ForSpec(ctx, clusterSpec). + deps, err := dependencies.ForSpec(clusterSpec). WithExecutableMountDirs(dirs...). WithWriterFolder(tmpPath). WithDocker(). diff --git a/pkg/dependencies/factory.go b/pkg/dependencies/factory.go index d8494436cfad1..7d70d9b7b2d0f 100644 --- a/pkg/dependencies/factory.go +++ b/pkg/dependencies/factory.go @@ -128,7 +128,7 @@ func (d *Dependencies) Close(ctx context.Context) error { return nil } -func ForSpec(ctx context.Context, clusterSpec *cluster.Spec) *Factory { +func ForSpec(clusterSpec *cluster.Spec) *Factory { versionsBundle := clusterSpec.RootVersionsBundle() eksaToolsImage := versionsBundle.Eksa.CliTools return NewFactory().