karmada icon indicating copy to clipboard operation
karmada copied to clipboard

[Umbrella] Use permanent-id to replace namespace/name labels in the resource

Open XiShanYongYe-Chang opened this issue 11 months ago • 9 comments

What would you like to be added:

Please ref to https://github.com/karmada-io/karmada/issues/4683#issuecomment-1996604867

Why is this needed:

Continue the work of #4000 and break down the tasks to be done.

  • [x] Unify and add permanent-id labels to PropagationPolicy/ClusterPropagationPolicy, ResourceBinding/ClusterResourceBinding, and Work resources in karmada-webhook.
    • [x] Add permanent-id for pp, cpp, rb, crb, work in the karmada-webhook @jwcesign @XiShanYongYe-Chang #4474
    • [x] Remove the add permanent-id logic in the karmada-controller-manager (we can do it in the next release) @whitewindmills
      • [x] For Work resource #4928
      • [x] For RB/CRB resource #4950
      • [x] For PP/CPP resource #4949
  • [x] Replace the use of namespace/name labels in the code with permanent-id labels, including: @whitewindmills @XiShanYongYe-Chang
    • [x] propagationpolicy.karmada.io/namespace, propagationpolicy.karmada.io/name -> propagationpolicy.karmada.io/permanent-id #4743
    • [x] clusterpropagationpolicy.karmada.io/name -> clusterpropagationpolicy.karmada.io/permanent-id #4743
    • [x] resourcebinding.karmada.io/key -> resourcebinding.karmada.io/permanent-id #4811
    • [x] clusterresourcebinding.karmada.io/key -> clusterresourcebinding.karmada.io/permanent-id #4811
    • [x] work.karmada.io/namespace, work.karmada.io/name -> work.karmada.io/permanent-id #4813 #4765 #4865
  • [x] Clean up the uid labels on the resource: @liangyuanpeng #4718
    • [x] propagationpolicy.karmada.io/uid
    • [x] clusterpropagationpolicy.karmada.io/uid
    • [x] resourcebinding.karmada.io/uid
    • [x] clusterresourcebinding.karmada.io/uid
    • [x] work.karmada.io/uid
  • [x] Deprecated namespace/name labels on resources: @whitewindmills
    • [x] Deprecated propagationpolicy.karmada.io/namespace #4743
    • [x] Deprecated propagationpolicy.karmada.io/name #4743
    • [x] Deprecated clusterpropagationpolicy.karmada.io/name #4743
    • [x] resourcebinding.karmada.io/key #4811
    • [x] clusterresourcebinding.karmada.io/key #4811
    • [x] work.karmada.io/namespace #4813
    • [x] work.karmada.io/name #4813
  • [x] Add validation for permanent-id @whitewindmills #4964
  • [x] Remove those labels: propagationpolicy.karmada.io/namespace, propagationpolicy.karmada.io/name in the v1.11. @XiShanYongYe-Chang #5020
  • [ ] The names of PP and CPP are not allowed to exceed 63 characters. This is the verification logic of karmada-webhook: https://github.com/karmada-io/karmada/blob/9822d099d1b717902003b2c7a11448d2cea6ac05/pkg/webhook/propagationpolicy/mutating.go#L74-L76 @XiShanYongYe-Chang #5029

Note: the reason for adding this verification is that the names of PP and CPP will appear in In the resource template and the label value of RB, this check can be removed after we solve the issue.

  • [x] Describe the impact of the current task on users and upgrade precautions in the upgrade document. @zhzhuang-zju https://github.com/karmada-io/website/pull/622

XiShanYongYe-Chang avatar Mar 14 '24 08:03 XiShanYongYe-Chang

I'm interested in this and I want to take care of Clean up the uid labels on the resource And do we plan to issue deprecation warnings to users before removing logic?

liangyuanpeng avatar Mar 17 '24 15:03 liangyuanpeng

I'm interested in this and I want to take care of Clean up the uid labels on the resource.

Thanks a lot~

And do we plan to issue deprecation warnings to users before removing logic?

I think it is necessary, although we have mentioned the need to discard these labels in many community meetings and related issue descriptions and discussions, we still need to find a clear place to describe the text, so that this information can be passed to more users.

Do you have any suggestions?

XiShanYongYe-Chang avatar Mar 18 '24 09:03 XiShanYongYe-Chang

/help Anyone interested can pick up the task to develop.

XiShanYongYe-Chang avatar Mar 18 '24 09:03 XiShanYongYe-Chang

@XiShanYongYe-Chang: This request has been marked as needing help from a contributor.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-help command.

In response to this:

/help Anyone interested can pick up the task to develop.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

karmada-bot avatar Mar 18 '24 09:03 karmada-bot

I wanna pick up this one Clean up namespace/name labels on resources.

whitewindmills avatar Mar 20 '24 02:03 whitewindmills

I wanna pick up this one Clean up namespace/name labels on resources.

Ok, thx~

XiShanYongYe-Chang avatar Mar 20 '24 02:03 XiShanYongYe-Chang

I think it is necessary, although we have mentioned the need to discard these labels in many community meetings and related issue descriptions and discussions, we still need to find a clear place to describe the text, so that this information can be passed to more users. Do you have any suggestions?

Is FeatureGates enough? At least it gives users a chance to be compatible., like :


  //**TODO GA in 1.11, delete the FeatureGate**
 if !FeatureGates.xxx.enabled {
        // TODO: Delete following two lines in release-1.9
	delete(bindingCopy.Labels, workv1alpha2.ResourceBindingUIDLabel)
	delete(bindingCopy.Labels, policyv1alpha1.PropagationPolicyUIDLabel)
 }

cc @chaunceyjiang

liangyuanpeng avatar Mar 20 '24 03:03 liangyuanpeng

@chaunceyjiang , it seems all the tasks have been picked up. Any input from you and any work that need us?

yizhang-zen avatar Mar 25 '24 19:03 yizhang-zen

/assign @liangyuanpeng @whitewindmills @XiShanYongYe-Chang

XiShanYongYe-Chang avatar Apr 08 '24 12:04 XiShanYongYe-Chang

All sub-tasks have been finished, let's close it. /close

XiShanYongYe-Chang avatar Aug 31 '24 03:08 XiShanYongYe-Chang