Skip to content

Commit

Permalink
Remove feature flag for create (#7609)
Browse files Browse the repository at this point in the history
* Remove feature flag for create

---------

Co-authored-by: EKS Distro PR Bot <[email protected]>
  • Loading branch information
mitalipaygude and eks-distro-pr-bot authored Feb 15, 2024
1 parent 1684fcd commit c9adafb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
16 changes: 1 addition & 15 deletions cmd/eksctl-anywhere/cmd/createcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"github.com/aws/eks-anywhere/pkg/validations"
"github.com/aws/eks-anywhere/pkg/validations/createvalidations"
newManagement "github.com/aws/eks-anywhere/pkg/workflow/management"
"github.com/aws/eks-anywhere/pkg/workflows"
"github.com/aws/eks-anywhere/pkg/workflows/management"
"github.com/aws/eks-anywhere/pkg/workflows/workload"
)
Expand Down Expand Up @@ -208,17 +207,6 @@ func (cc *createClusterOptions) createCluster(cmd *cobra.Command, _ []string) er
return err
}

createCluster := workflows.NewCreate(
deps.UnAuthKubeClient,
deps.Bootstrapper,
deps.Provider,
deps.ClusterManager,
deps.GitOpsFlux,
deps.Writer,
deps.EksdInstaller,
deps.PackageInstaller,
)

mgmt := getManagementCluster(clusterSpec)

validationOpts := &validations.Opts{
Expand Down Expand Up @@ -273,7 +261,7 @@ func (cc *createClusterOptions) createCluster(cmd *cobra.Command, _ []string) er
)
err = createWorkloadCluster.Run(ctx, clusterSpec, createValidations)

} else if clusterSpec.Cluster.IsSelfManaged() && features.UseControllerViaCLIWorkflow().IsActive() {
} else if clusterSpec.Cluster.IsSelfManaged() {
logger.Info("Using the new workflow using the controller for management cluster create")

createMgmtCluster := management.NewCreate(
Expand All @@ -289,8 +277,6 @@ func (cc *createClusterOptions) createCluster(cmd *cobra.Command, _ []string) er
)

err = createMgmtCluster.Run(ctx, clusterSpec, createValidations)
} else {
err = createCluster.Run(ctx, clusterSpec, createValidations, cc.forceClean)
}

cleanup(deps, &err)
Expand Down
3 changes: 1 addition & 2 deletions cmd/eksctl-anywhere/cmd/deletecluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"github.com/spf13/cobra"

"github.com/aws/eks-anywhere/pkg/dependencies"
"github.com/aws/eks-anywhere/pkg/features"
"github.com/aws/eks-anywhere/pkg/kubeconfig"
"github.com/aws/eks-anywhere/pkg/logger"
"github.com/aws/eks-anywhere/pkg/providers/tinkerbell/hardware"
Expand Down Expand Up @@ -156,7 +155,7 @@ func (dc *deleteClusterOptions) deleteCluster(ctx context.Context) error {
}
}

if features.UseControllerViaCLIWorkflow().IsActive() && clusterSpec.Cluster.IsManaged() {
if clusterSpec.Cluster.IsManaged() {
deleteWorkload := workload.NewDelete(deps.Provider, deps.Writer, deps.ClusterManager, deps.ClusterDeleter, deps.GitOpsFlux)
err = deleteWorkload.Run(ctx, cluster, clusterSpec)
} else {
Expand Down

0 comments on commit c9adafb

Please sign in to comment.