karmada-io / karmada

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

Replace work `propagation.karmada.io/instruction` annotation with work `Suspension` field #5386

Open XiShanYongYe-Chang opened 2 months ago

XiShanYongYe-Chang commented 2 months ago

In the past, we've used the annotation propagation.karmada.io/instruction to mark Work propagation instruction, when it's value is suppressed, it indicates that the resource should not be propagated.

https://github.com/karmada-io/karmada/blob/c575d4f211839be2fbaac767d956dab28d30ad8f/pkg/util/constants.go#L41-L47

In the proposal Support for cluster-level resource propagation pause and resume capabilities, we add the Suspension filed in the Work API, as stated in the proposal, we can replace work propagation.karmada.io/instruction annotation with work Suspension field.

We can mark the propagation.karmada.io/instruction annotation as deprecated, replace the annotation with the Suspension field in the code logic, and finally remove the annotation.

XiShanYongYe-Chang commented 2 months ago

/help

Looking forward to interested people to participate in this work. Feel free to communicate if you have any questions.

karmada-bot commented 2 months ago

@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](https://github.com/karmada-io/karmada/issues/5386): >/help > >Looking forward to interested people to participate in this work. Feel free to communicate if you have any questions. Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
a7i commented 1 month ago

I would be interested in contributing :)

/assign

XiShanYongYe-Chang commented 1 month ago

Thanks a lot ^-^ @a7i

a7i commented 3 weeks ago

Two areas I could use some guidance on:

  1. Migration of existing Work that is suspended via annotation. How do you think this should be done?

  2. Querying Work by label Selector. It seems to me that we should leave the label for work created by MultiClusterService. Thoughts? https://github.com/karmada-io/karmada/blob/004de437332c3d28351178eca179616faee8892c/pkg/controllers/multiclusterservice/mcs_controller.go#L133-L135

XiShanYongYe-Chang commented 2 weeks ago

Hi @a7i

For 1: Existing works that use the propagation.karmada.io/instruction label are collected from member clusters and are used to wrap the EndpointSlice objects; they do not have corresponding resource templates in the Karmada control plane. Therefore, I understand that they will not introduce upgrade issues and can be processed directly.

For 2, I‘m sorry, I didn't quite understand the meaning of the question.