-
Notifications
You must be signed in to change notification settings - Fork 888
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: conflict while using gc policy and shared-resource policy concurrently #5330
Fix: conflict while using gc policy and shared-resource policy concurrently #5330
Conversation
Codecov ReportBase: 61.12% // Head: 61.04% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #5330 +/- ##
==========================================
- Coverage 61.12% 61.04% -0.08%
==========================================
Files 308 308
Lines 46773 46785 +12
==========================================
- Hits 28589 28559 -30
- Misses 15211 15251 +40
- Partials 2973 2975 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
…rently Signed-off-by: Somefive <yd219913@alibaba-inc.com>
baf3cc7
to
f8239be
Compare
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
e8db79f
to
72e54e5
Compare
Backport failed for Please cherry-pick the changes locally. git fetch origin release-1.6
git worktree add -d .worktree/backport-5330-to-release-1.6 origin/release-1.6
cd .worktree/backport-5330-to-release-1.6
git checkout -b backport-5330-to-release-1.6
ancref=$(git merge-base df3f134f12dcc1894f072527a3f91273c31e749b 72e54e5f9052a2cb17d2827b9b610a70a6431a59)
git cherry-pick -x $ancref..72e54e5f9052a2cb17d2827b9b610a70a6431a59 |
Successfully created backport PR #5333 for |
…rently (kubevela#5330) * Fix: conflict while using gc policy and shared-resource policy concurrently Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: github ci Signed-off-by: Somefive <yd219913@alibaba-inc.com> Signed-off-by: Somefive <yd219913@alibaba-inc.com>
…rently (kubevela#5330) * Fix: conflict while using gc policy and shared-resource policy concurrently Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: github ci Signed-off-by: Somefive <yd219913@alibaba-inc.com> Signed-off-by: Somefive <yd219913@alibaba-inc.com>
…rently (#5330) (#5338) * Fix: conflict while using gc policy and shared-resource policy concurrently Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: github ci Signed-off-by: Somefive <yd219913@alibaba-inc.com> Signed-off-by: Somefive <yd219913@alibaba-inc.com> Signed-off-by: Somefive <yd219913@alibaba-inc.com>
…rently (kubevela#5330) * Fix: conflict while using gc policy and shared-resource policy concurrently Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: github ci Signed-off-by: Somefive <yd219913@alibaba-inc.com> Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Signed-off-by: Somefive yd219913@alibaba-inc.com
Description of your changes
When one resource in an application is set to skipGC and being shared, the recycle process could have problems.
For sharing resource, controller will: Check if the application is the last only sharer. If not, just let the next sharer become the owner. If true, it will go on for the deletion.
For skipGC, controller will: Stop the normal deletion and only remove owner label.
So when two policy comes together, the owner label will be removed by the resource sharing label is not, which will leave the controller retry infinitely since the resource sharing label will let the controller treat the resource as not recycled completely.
This PR fixes it through adding additional sharer label removal for sharing resource recycle.
I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR if necessary.How has this code been tested
Special notes for your reviewer