[Multi_K8s-Plugin] Baseline Clean#6607
Open
mohammedfirdouss wants to merge 4 commits intopipe-cd:masterfrom
Open
[Multi_K8s-Plugin] Baseline Clean#6607mohammedfirdouss wants to merge 4 commits intopipe-cd:masterfrom
mohammedfirdouss wants to merge 4 commits intopipe-cd:masterfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does: Adds the
K8S_BASELINE_CLEANstage 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_ROLLOUTcreates 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_CLEANto 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