karmada-io / karmada

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

I think we should enhance the feature of promote, to support migrate resources to the control plane without creating propagationpolicy automatically. #2546

Open mrningyang opened 2 years ago

mrningyang commented 2 years ago

What would you like to be added: I want to add a new option for the feature of promote to support skip creating PP automatically.

Why is this needed: I think the feature of promote is not very practical,it can hardly be used in a production environment. when we use promote to migrate resources to the control plane, it will create resource in control plane firstly, and create a default PP secondly. I think there are some problems with that,for example:

  1. Before the default PP is created,the resource may be delivered by other PP,this will lead to undesirable effects.
  2. In a production environment, the default PP is created by promote is unlikely to be what we ultimately need. In most scenes,we won't create a PP for each resource.

I think giving the choice to the user is a good idea,user can create PP by themselves firstly and then use promote to just create resource。So I think it's useful to add a new option for the feature of promote to support skip creating PP automatically, this will be more flexible.

chaunceyjiang commented 2 years ago

user can create PP by themselves firstly and then use promote to just create resource。So I think it's useful to add a new option for the feature of promote to support skip creating PP automatically, this will be more flexible.

I think this is a very good idea.

RainbowMango commented 2 years ago

In most scenes,we won't create a PP for each resource. So I think it's useful to add a new option for the feature of promote to support skip creating PP automatically, this will be more flexible.

Good point. Maybe another approach is to let promote accept a PP which is created by the user or by previous promotion. (For now, PP is not allowed to edit the .spec.resourceSelector, we are going to disable the restriction.)

RainbowMango commented 2 years ago

Before the default PP is created,the resource may be delivered by other PP,this will lead to undesirable effects.

Maybe we can create the PP first. cc author @lonelyCZ for comment.

mrningyang commented 2 years ago

Before the default PP is created,the resource may be delivered by other PP,this will lead to undesirable effects.

Maybe we can create the PP first. cc author @lonelyCZ for comment.

I think it is necessary to add a new option to support skipping creating PP automatically,and I'd like to do it.

RainbowMango commented 2 years ago

Thanks @mrningyang. Glad to hear that you want help. I can assign this issue to you, but let's wait for the author's comment for a while. (I know @lonelyCZ now is on a business trip, maybe he can comment once he is available.) /assign @mrningyang

XiShanYongYe-Chang commented 8 months ago

Hi @mrningyang do you still need this feature?