karmada-io / karmada

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

Remove work label on the member cluster resource #4765

Closed XiShanYongYe-Chang closed 1 month ago

XiShanYongYe-Chang commented 1 month ago

What type of PR is this?

/kind bug

What this PR does / why we need it:

Karmada will generate the work namespace/name labels on the resources propagated to member clusters:

When the created resource name is longer than 63 characters, those labels will cause the resource to fail to be created successfully in the member cluster.

So we need to remove those labels from resources propagated to member clusters.

Which issue(s) this PR fixes: Fixes #4683

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

karmada-controller-manager: remove the work namespace/name labels from resources propagated to member clusters
codecov-commenter commented 1 month ago

Codecov Report

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

Project coverage is 51.78%. Comparing base (ff7322a) to head (0e60af8).

Files Patch % Lines
pkg/controllers/binding/common.go 50.00% 1 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 #4765 +/- ## ========================================== - Coverage 51.79% 51.78% -0.02% ========================================== Files 250 250 Lines 24991 24989 -2 ========================================== - Hits 12945 12940 -5 - Misses 11337 11339 +2 - Partials 709 710 +1 ``` | [Flag](https://app.codecov.io/gh/karmada-io/karmada/pull/4765/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/4765/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=karmada-io) | `51.78% <85.71%> (-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.

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: - ~~[pkg/controllers/OWNERS](https://github.com/karmada-io/karmada/blob/master/pkg/controllers/OWNERS)~~ [RainbowMango] - ~~[pkg/util/OWNERS](https://github.com/karmada-io/karmada/blob/master/pkg/util/OWNERS)~~ [RainbowMango] 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 month ago

Thank you @XiShanYongYe-Chang 🏆 We'll give this a try over the next day or two

XiShanYongYe-Chang commented 1 month ago

We'll give this a try over the next day or two

Looking forward to your feedback :)

yizhang-zen commented 1 month ago

Confirm the change fixes our issue on sync failure for resource name > 63 chars. Thanks, team! ❤️