karmada-io / karmada

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

Deprecate name/namespace labels of work #4813

Closed whitewindmills closed 4 days ago

whitewindmills commented 3 weeks ago

What type of PR is this? /kind feature

What this PR does / why we need it:

work.karmada.io/namespace, work.karmada.io/name -> work.karmada.io/permanent-id

Which issue(s) this PR fixes: part of https://github.com/karmada-io/karmada/issues/4711

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

karmada-controller-manager: deprecate name/namespace labels of work.
whitewindmills commented 3 weeks ago

Split from https://github.com/karmada-io/karmada/pull/4743. /cc @RainbowMango

whitewindmills commented 3 weeks ago

@XiShanYongYe-Chang PTAL~

XiShanYongYe-Chang commented 3 weeks ago

/assign

XiShanYongYe-Chang commented 1 week ago

~Do we also need to be clear about the labels here:~

https://github.com/karmada-io/karmada/blob/6e5a6029922091e22bdae470323c2483334273ff/pkg/controllers/namespace/namespace_sync_controller.go#L163-L164

I submit a pr to fix this: #4865

codecov-commenter commented 1 week ago

Codecov Report

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

Project coverage is 53.07%. Comparing base (8f9a624) to head (8328054). Report is 4 commits behind head on master.

Files Patch % Lines
pkg/controllers/status/work_status_controller.go 63.63% 4 Missing :warning:

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #4813 +/- ## ========================================== - Coverage 53.08% 53.07% -0.02% ========================================== Files 251 251 Lines 20387 20389 +2 ========================================== - Hits 10822 10821 -1 - Misses 8852 8855 +3 Partials 713 713 ``` | [Flag](https://app.codecov.io/gh/karmada-io/karmada/pull/4813/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/4813/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=karmada-io) | `53.07% <66.66%> (-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.

whitewindmills commented 1 week ago

@RainbowMango @XiShanYongYe-Chang can we safely remove this file? since it won't be used. https://github.com/karmada-io/karmada/blob/a57ca7ef06b455bd4e1dc3dd9b0f97772419e5e1/pkg/apis/work/v1alpha1/well_known_constants.go#L1-L25

XiShanYongYe-Chang commented 6 days ago

can we safely remove this file? since it won't be used.

The file is empty. I think we can remove it.

whitewindmills commented 6 days ago

Please continue to help review this PR. /cc @RainbowMango

RainbowMango commented 6 days ago

OK, thanks. will do ASAP.

This PR focuses on removing labels(work.karmada.io/namespace, work.karmada.io/name) from the codebase, right?

whitewindmills commented 6 days ago

This PR focuses on removing labels(work.karmada.io/namespace, work.karmada.io/name) from the codebase, right?

yes

karmada-bot commented 4 days ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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

The pull request process is described here

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