karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.12k stars 807 forks source link

fix: retain `PersistentVolumeClaim` annotation `volume.kubernetes.io/selected-node` #4847

Open a7i opened 2 weeks ago

a7i commented 2 weeks ago

What type of PR is this?

/kind bug

What this PR does / why we need it:

As my colleague @jklaw90 discovered that selected-node is for the node that volume is mounted on. If this node doesn't exist, then it is never removed. See upstream issue: https://github.com/kubernetes/kubernetes/issues/100485

we should also remove this field since it's irrelevant, given that node names are likely not going to be the same.

Which issue(s) this PR fixes: Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

karmada-controller-manager: retain `PersistentVolume` annotation `volume.kubernetes.io/selected-node`
codecov-commenter commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 60.00000% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 53.10%. Comparing base (fdad87e) to head (0b15cb7). Report is 8 commits behind head on master.

Files Patch % Lines
pkg/resourceinterpreter/default/native/retain.go 33.33% 4 Missing and 2 partials :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #4847 +/- ## ========================================== - Coverage 53.11% 53.10% -0.02% ========================================== Files 250 250 Lines 20351 20385 +34 ========================================== + Hits 10810 10826 +16 - Misses 8824 8836 +12 - Partials 717 723 +6 ``` | [Flag](https://app.codecov.io/gh/karmada-io/karmada/pull/4847/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=karmada-io) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/karmada-io/karmada/pull/4847/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=karmada-io) | `53.10% <60.00%> (-0.02%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=karmada-io#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

XiShanYongYe-Chang commented 1 week ago

LGTM @a7i, can you help squash the commit into one?

XiShanYongYe-Chang commented 1 week ago

Hi @a7i, can you help add the component name to the release note?

karmada-bot commented 1 week ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: chaunceyjiang To complete the pull request process, please assign rainbowmango after the PR has been reviewed. You can assign the PR to them by writing /assign @rainbowmango in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/karmada-io/karmada/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
a7i commented 1 week ago

/remove-hold

a7i commented 1 week ago

/retest-required

a7i commented 1 week ago

/assign @rainbowmango