[Multi_K8s-Plugin] Canary Clean#6589
Open
mohammedfirdouss wants to merge 5 commits intopipe-cd:masterfrom
Open
[Multi_K8s-Plugin] Canary Clean#6589mohammedfirdouss wants to merge 5 commits intopipe-cd:masterfrom
mohammedfirdouss wants to merge 5 commits intopipe-cd:masterfrom
Conversation
Signed-off-by: Mohammed Firdous <mohammedfirdousaraoye@gmail.com>
Signed-off-by: Mohammed Firdous <mohammedfirdousaraoye@gmail.com>
…ions Signed-off-by: Mohammed Firdous <mohammedfirdousaraoye@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6589 +/- ##
==========================================
+ Coverage 28.79% 36.52% +7.73%
==========================================
Files 575 17 -558
Lines 60858 876 -59982
==========================================
- Hits 17526 320 -17206
+ Misses 41997 533 -41464
+ Partials 1335 23 -1312 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
@Warashi This is the PR for Canary Clean, I will resolve the merge conflicts shortly Also, there is no need for testdata right? Clean doesn't load manifests at all, it just queries live resources by label and deletes them. |
…multi-cluster deployments 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: Implements the
K8S_CANARY_CLEANstage for the kubernetes_multicluster plugin. When this stage runs, it deletes all canary variant resources (labelledpipecd.dev/variant: canary) from every targeted cluster in parallel, completing the canary lifecycle after evaluation. The stage uses the existingdeleteVariantResourceshelper and follows the same errgroup orchestration pattern asK8S_CANARY_ROLLOUTfor consistency.Why we need it: The multicluster plugin now supports canary deployments with
K8S_CANARY_ROLLOUT, but lacked a way to clean up canary resources after evaluation.K8S_CANARY_CLEANenables the complete canary/baseline/primary pipeline strategy by providing a dedicated cleanup step, preventing canary replicas from persisting in the cluster and reducing resource waste. This completes the canary workflow and ensures a clean state for subsequent promotions.Which issue(s) this PR fixes: Part of #6446
Does this PR introduce a user-facing change?:
Yes — users can now add a
K8S_CANARY_CLEANstage to theirapp.pipecd.yamlpipeline when using the kubernetes_multicluster plugin.How are users affected by this change: Users who do not use a pipeline are unaffected. Users who configure a canary pipeline can now add
K8S_CANARY_CLEANas a post-evaluation step to automatically remove canary resources across all targeted clusters. This stage requires no additional configuration options—it simply deletes all resources with the canary variant label.Is this breaking change: No
How to migrate (if breaking change): N/A