From 214023fd85bd509eaa1edcc83ed6cb2c20919243 Mon Sep 17 00:00:00 2001 From: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com> Date: Fri, 29 May 2026 23:19:01 +0000 Subject: [PATCH] [Multi_K8s-Plugin] rename stages to avoid conflicts with kubernetes plugin Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com> --- .../deployment/canary_test.go | 12 ++++++------ .../kubernetes_multicluster/deployment/pipeline.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pkg/app/pipedv1/plugin/kubernetes_multicluster/deployment/canary_test.go b/pkg/app/pipedv1/plugin/kubernetes_multicluster/deployment/canary_test.go index 479e5348f7..05e17d7c5d 100644 --- a/pkg/app/pipedv1/plugin/kubernetes_multicluster/deployment/canary_test.go +++ b/pkg/app/pipedv1/plugin/kubernetes_multicluster/deployment/canary_test.go @@ -334,7 +334,7 @@ func TestPlugin_executeK8sMultiCanaryCleanStage(t *testing.T) { input := &sdk.ExecuteStageInput[kubeconfig.KubernetesApplicationSpec]{ Request: sdk.ExecuteStageRequest[kubeconfig.KubernetesApplicationSpec]{ - StageName: "K8S_CANARY_CLEAN", + StageName: "K8S_MULTI_CANARY_CLEAN", StageConfig: []byte(`{}`), TargetDeploymentSource: sdk.DeploymentSource[kubeconfig.KubernetesApplicationSpec]{ ApplicationDirectory: filepath.Join("testdata", "simple"), @@ -446,7 +446,7 @@ func TestPlugin_executeK8sMultiCanaryCleanStage_multipleTargets(t *testing.T) { input := &sdk.ExecuteStageInput[kubeconfig.KubernetesApplicationSpec]{ Request: sdk.ExecuteStageRequest[kubeconfig.KubernetesApplicationSpec]{ - StageName: "K8S_CANARY_CLEAN", + StageName: "K8S_MULTI_CANARY_CLEAN", StageConfig: []byte(`{}`), TargetDeploymentSource: sdk.DeploymentSource[kubeconfig.KubernetesApplicationSpec]{ ApplicationDirectory: filepath.Join("testdata", "simple"), @@ -548,7 +548,7 @@ func TestPlugin_executeK8sMultiCanaryCleanStage_withCreateService(t *testing.T) input := &sdk.ExecuteStageInput[kubeconfig.KubernetesApplicationSpec]{ Request: sdk.ExecuteStageRequest[kubeconfig.KubernetesApplicationSpec]{ - StageName: "K8S_CANARY_ROLLOUT", + StageName: "K8S_MULTI_CANARY_ROLLOUT", StageConfig: []byte(`{"createService": true}`), TargetDeploymentSource: sdk.DeploymentSource[kubeconfig.KubernetesApplicationSpec]{ ApplicationDirectory: configDir, @@ -590,7 +590,7 @@ func TestPlugin_executeK8sMultiCanaryCleanStage_withCreateService(t *testing.T) require.True(t, ok) ok = t.Run("execute canary clean stage", func(t *testing.T) { - input.Request.StageName = "K8S_CANARY_CLEAN" + input.Request.StageName = "K8S_MULTI_CANARY_CLEAN" input.Request.StageConfig = []byte(`{}`) status := plugin.executeK8sMultiCanaryCleanStage(ctx, input, deployTarget) @@ -621,7 +621,7 @@ func TestPlugin_executeK8sMultiCanaryCleanStage_withoutCreateService(t *testing. input := &sdk.ExecuteStageInput[kubeconfig.KubernetesApplicationSpec]{ Request: sdk.ExecuteStageRequest[kubeconfig.KubernetesApplicationSpec]{ - StageName: "K8S_CANARY_ROLLOUT", + StageName: "K8S_MULTI_CANARY_ROLLOUT", StageConfig: []byte(`{}`), TargetDeploymentSource: sdk.DeploymentSource[kubeconfig.KubernetesApplicationSpec]{ ApplicationDirectory: configDir, @@ -664,7 +664,7 @@ func TestPlugin_executeK8sMultiCanaryCleanStage_withoutCreateService(t *testing. require.True(t, ok) ok = t.Run("execute canary clean stage", func(t *testing.T) { - input.Request.StageName = "K8S_CANARY_CLEAN" + input.Request.StageName = "K8S_MULTI_CANARY_CLEAN" input.Request.StageConfig = []byte(`{}`) status := plugin.executeK8sMultiCanaryCleanStage(ctx, input, deployTarget) diff --git a/pkg/app/pipedv1/plugin/kubernetes_multicluster/deployment/pipeline.go b/pkg/app/pipedv1/plugin/kubernetes_multicluster/deployment/pipeline.go index be0648fb9a..589d630f9e 100644 --- a/pkg/app/pipedv1/plugin/kubernetes_multicluster/deployment/pipeline.go +++ b/pkg/app/pipedv1/plugin/kubernetes_multicluster/deployment/pipeline.go @@ -27,17 +27,17 @@ const ( // StageK8sMultiRollback represents the state where all deployed resources should be rollbacked. StageK8sMultiRollback = "K8S_MULTI_ROLLBACK" // StageK8sMultiCanaryRollout represents the state where the new version is deployed as CANARY to all targets. - StageK8sMultiCanaryRollout = "K8S_CANARY_ROLLOUT" + StageK8sMultiCanaryRollout = "K8S_MULTI_CANARY_ROLLOUT" // StageK8sMultiCanaryClean represents the state where all canary resources should be removed. - StageK8sMultiCanaryClean = "K8S_CANARY_CLEAN" + StageK8sMultiCanaryClean = "K8S_MULTI_CANARY_CLEAN" // StageK8sMultiPrimaryRollout represents the state where the new version is promoted as PRIMARY to all targets. - StageK8sMultiPrimaryRollout = "K8S_PRIMARY_ROLLOUT" + StageK8sMultiPrimaryRollout = "K8S_MULTI_PRIMARY_ROLLOUT" // StageK8sMultiBaselineRollout represents the state where the current version is deployed as BASELINE to all targets. - StageK8sMultiBaselineRollout = "K8S_BASELINE_ROLLOUT" + StageK8sMultiBaselineRollout = "K8S_MULTI_BASELINE_ROLLOUT" // StageK8sMultiBaselineClean represents the state where all baseline resources should be removed. - StageK8sMultiBaselineClean = "K8S_BASELINE_CLEAN" + StageK8sMultiBaselineClean = "K8S_MULTI_BASELINE_CLEAN" // StageK8sMultiTrafficRouting represents the state where traffic is routed between variants. - StageK8sMultiTrafficRouting = "K8S_TRAFFIC_ROUTING" + StageK8sMultiTrafficRouting = "K8S_MULTI_TRAFFIC_ROUTING" ) var allStages = []string{