Skip to content

[Multi_K8s-Plugin] Baseline Clean#6607

Open
mohammedfirdouss wants to merge 4 commits intopipe-cd:masterfrom
mohammedfirdouss:feat/k8s-multi-baseline-clean
Open

[Multi_K8s-Plugin] Baseline Clean#6607
mohammedfirdouss wants to merge 4 commits intopipe-cd:masterfrom
mohammedfirdouss:feat/k8s-multi-baseline-clean

Conversation

@mohammedfirdouss
Copy link
Contributor

What this PR does: Adds the K8S_BASELINE_CLEAN stage to the kubernetes_multicluster plugin.
After a canary analysis window ends, whether the decision was to promote or roll back, the baseline resources created by K8S_BASELINE_ROLLOUT need to be removed. This stage does exactly that: it finds and deletes all resources labeled pipecd.dev/variant=baseline for the application, across all target clusters in parallel. Without this stage, baseline pods would run indefinitely after the pipeline completes, wasting cluster resources and cluttering kubectl get deployments.

Why we need it: K8S_BASELINE_ROLLOUT creates temporary resources (simple-baseline deployment, optionally a simple-baseline service) so you can compare the current version against canary side-by-side. Once the analysis window is over, those resources are useless. This stage removes them cleanly and in the correct order (Services before Workloads) to avoid routing traffic to terminating pods.

Which issue(s) this PR fixes: #6446

Does this PR introduce a user-facing change?:

  • How are users affected by this change: Users can now add K8S_BASELINE_CLEAN to their pipeline config to automatically remove baseline resources after canary analysis completes. Without this stage they would need to manually delete the baseline deployment and service.

  • Is this breaking change: No.

  • How to migrate (if breaking change): N/A

Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
…ment

Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[LFX Mentorship T-1 2026] Kubernetes Multi-Cluster Plugin Enhancement #6446

1 participant