karmada-io / karmada

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

feat: add permanent id label to pp/cpp/rb/crb/work resources #4474

Closed jwcesign closed 2 weeks ago

jwcesign commented 4 months ago

What type of PR is this? /kind feature

What this PR does / why we need it: Please referring to: https://github.com/karmada-io/karmada/issues/4000 and https://github.com/karmada-io/karmada/pull/4199#discussion_r1393842038

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

Special notes for your reviewer: The corresponding yaml configuration will be done in another PR.

Does this PR introduce a user-facing change?:

codecov-commenter commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 51.82%. Comparing base (6534ffb) to head (a542ad5).

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #4474 +/- ## ========================================== + Coverage 51.76% 51.82% +0.06% ========================================== Files 250 250 Lines 24980 25008 +28 ========================================== + Hits 12930 12961 +31 + Misses 11340 11338 -2 + Partials 710 709 -1 ``` | [Flag](https://app.codecov.io/gh/karmada-io/karmada/pull/4474/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/4474/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=karmada-io) | `51.82% <100.00%> (+0.06%)` | :arrow_up: | 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.

jwcesign commented 4 months ago

/cc @XiShanYongYe-Chang @chaosi-zju @chaunceyjiang

chaunceyjiang commented 4 months ago

/cancel lgtm

RainbowMango commented 4 months ago

It looks good to initialize the label by webhook, however, I think there is no rush to do it. As the label name might be changed.

I feel the label name might not be prefixed with a resource kind, for example, the label name on PropagationPolicy now is:

propagationpolicy.karmada.io/permanent-id: xxxx

But it should be something like:

resource.karmada.io/permanent-id: xxxx

I feel it isn't right for each PP/CPP/RB/CRB/Work to have a dedicated label.

RainbowMango commented 4 months ago

/hold for a while.

yizhang-zen commented 2 months ago

@RainbowMango, any plan to move forward? Is it currently on hold for more discussions? We are waiting for a solution for issue.

XiShanYongYe-Chang commented 2 months ago

Current progress on the issue: https://github.com/karmada-io/karmada/issues/4683#issuecomment-1996604867

XiShanYongYe-Chang commented 2 months ago

It looks good to initialize the label by webhook, however, I think there is no rush to do it. As the label name might be changed.

I feel the label name might not be prefixed with a resource kind, for example, the label name on PropagationPolicy now is:

propagationpolicy.karmada.io/permanent-id: xxxx

But it should be something like:

resource.karmada.io/permanent-id: xxxx

I feel it isn't right for each PP/CPP/RB/CRB/Work to have a dedicated label.

If we want to change the label name, we can remove the previously used namespace/name related labels at least in the next version (v1.11), and solve the problem described in #4000. Is this progress as expected?

RainbowMango commented 1 month ago

If we want to change the label name, we can remove the previously used namespace/name related labels at least in the next version (v1.11), and solve the problem described in https://github.com/karmada-io/karmada/issues/4000. Is this progress as expected?

Yeah, thanks for the reminder. Let's move forward and if we decide to rename the label in the future, we can run another deprecation cycle.

RainbowMango commented 1 month ago

@jwcesign Can you help to rebase this PR?

And, shall we update the MutatingWebhookConfiguration along with this?

XiShanYongYe-Chang commented 1 month ago

This PR is missing the webhook-configuration file.

karmada-bot commented 1 month 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
RainbowMango commented 1 month ago

@XiShanYongYe-Chang The test is failing, please take a look.

XiShanYongYe-Chang commented 1 month ago

@XiShanYongYe-Chang The test is failing, please take a look.

I'm working on it.

XiShanYongYe-Chang commented 1 month ago

The current PR can be pushed after the modification of karmadactl init in #4789 is complete.

XiShanYongYe-Chang commented 1 month ago

/cc @RainbowMango It is ready to merge now.

RainbowMango commented 1 month ago

Uh, please propose a release notes... And this must be something that should be put in upgrading docs, do we have a task for it?

XiShanYongYe-Chang commented 1 month ago

Uh, please propose a release notes...

How about add permanentID label for PP/CPP/RB/CRB/Work resources in karmada-webhook?

And this must be something that should be put in upgrading docs, do we have a task for it?

I added a sub-task to the task item of #4711 to describe this.

XiShanYongYe-Chang commented 1 month ago

/cc @RainbowMango

XiShanYongYe-Chang commented 3 weeks ago

Kindly ping @RainbowMango @chaunceyjiang

XiShanYongYe-Chang commented 2 weeks ago

/assign @chaunceyjiang @RainbowMango

RainbowMango commented 2 weeks ago

/hold cancel