diff --git a/pkg/workflows/management/create_gitops.go b/pkg/workflows/management/create_gitops.go index cdadf436ab0f..0ea97ceed122 100644 --- a/pkg/workflows/management/create_gitops.go +++ b/pkg/workflows/management/create_gitops.go @@ -14,10 +14,8 @@ func (s *installGitOpsManagerTask) Run(ctx context.Context, commandContext *task logger.Info("Installing GitOps Toolkit on workload cluster") managementComponents := cluster.ManagementComponentsFromBundles(commandContext.ClusterSpec.Bundles) - err := commandContext.GitOpsManager.InstallGitOps(ctx, commandContext.WorkloadCluster, managementComponents, commandContext.ClusterSpec, commandContext.Provider.DatacenterConfig(commandContext.ClusterSpec), commandContext.Provider.MachineConfigs(commandContext.ClusterSpec)) - if err != nil { + if err := commandContext.GitOpsManager.InstallGitOps(ctx, commandContext.WorkloadCluster, managementComponents, commandContext.ClusterSpec, commandContext.Provider.DatacenterConfig(commandContext.ClusterSpec), commandContext.Provider.MachineConfigs(commandContext.ClusterSpec)); err != nil { logger.MarkFail("Error when installing GitOps toolkits on workload cluster; EKS-A will continue with cluster creation, but GitOps will not be enabled", "error", err) - return nil } return &writeCreateClusterConfig{} } diff --git a/pkg/workflows/management/create_test.go b/pkg/workflows/management/create_test.go index c301288da3d8..5f33c351b428 100644 --- a/pkg/workflows/management/create_test.go +++ b/pkg/workflows/management/create_test.go @@ -727,6 +727,9 @@ func TestCreateGitOPsFailure(t *testing.T) { test.gitOpsManager.EXPECT().InstallGitOps( test.ctx, test.workloadCluster, test.managementComponents, test.clusterSpec, test.datacenterConfig, test.machineConfigs).Return(errors.New("test")), ) + test.expectWriteClusterConfig() + test.expectDeleteBootstrap(nil) + test.expectCuratedPackagesInstallation() err := test.run() if err != nil { diff --git a/pkg/workflows/management/secrets.go b/pkg/workflows/management/secrets.go index 493c4f0182c9..f89239545402 100644 --- a/pkg/workflows/management/secrets.go +++ b/pkg/workflows/management/secrets.go @@ -7,8 +7,10 @@ import ( "github.com/aws/eks-anywhere/pkg/workflows" ) -type updateSecrets struct{} -type updateSecretsCreate struct{} +type ( + updateSecrets struct{} + updateSecretsCreate struct{} +) // Run updateSecrets updates management cluster's secrets. func (s *updateSecrets) Run(ctx context.Context, commandContext *task.CommandContext) task.Task {