Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Support merge GetDependensis result #5121

Open
Vacant2333 opened this issue Jul 2, 2024 · 5 comments
Open

[Feature] Support merge GetDependensis result #5121

Vacant2333 opened this issue Jul 2, 2024 · 5 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@Vacant2333
Copy link
Contributor

What would you like to be added:
I hope Karmada can merge the results of defaultInterpreter and customizedInterpreter.

Ref: https://github.com/Vacant2333/karmada/blob/3232c52d57b331d7120eeaac9386b848197475df/pkg/resourceinterpreter/interpreter.go#L277

Why is this needed:
As a user, when I submit a vcjob/pod/deployment, I have my own additional controller that creates an extra associated resource, PodGroup, for vcjob/pod/deployment. I want to deploy it to the target cluster along with the main resource. I understand that the PropagateDeps feature can achieve this, but we cannot explicitly associate the PodGroup with the main resource. When the PodGroup is created, it only marks the resource it is associated with in the annotation. Therefore, we have thought of two methods:

  1. When creating the PodGroup, simultaneously create a ResourceBinding for this PodGroup and supplement it with RequireBy to achieve simultaneous scheduling to the same cluster.
  2. Use the ResourceInterpreterCustomization method to modify the results of GetDependencies to include our PodGroup.

The first solution seems feasible, but I believe it can only be a temporary solution, so our focus is mainly on the second solution. For the second solution, once we set the ResourceInterpreterCustomization for pod/deployment, it will replace the Default Interpreter, which we do not want. What we need is to add a PodGroup to the results of the DefaultInterpreter.

Thanks! Can guys give me some comments about this feature?

@Vacant2333 Vacant2333 added the kind/feature Categorizes issue or PR as related to a new feature. label Jul 2, 2024
@XiShanYongYe-Chang
Copy link
Member

@Vacant2333, thanks for your user case.

I think you're referring to the InterpretDependency hook point. It may not be necessary for other interpreters to merge results.

The current feasible method is to implement the defalut interpreter again when the user customizes the InterpretDependency interpreter behavior. This is really bad for user experience. I think it is a point that can be optimized iteratively.

What do you think? @chaunceyjiang @yike21 @RainbowMango @whitewindmills

@Vacant2333
Copy link
Contributor Author

@Vacant2333, thanks for your user case.

I think you're referring to the InterpretDependency hook point. It may not be necessary for other interpreters to merge results.

The current feasible method is to implement the defalut interpreter again when the user customizes the InterpretDependency interpreter behavior. This is really bad for user experience. I think it is a point that can be optimized iteratively.

What do you think? @chaunceyjiang @yike21 @RainbowMango @whitewindmills

Yes, I think this is an area that can be optimized. If I need to modify the Pod’s GetDependensis, then I need to obtain the results from karmada’s defaultInterpreter and also add my own results.

@XiShanYongYe-Chang
Copy link
Member

@Vacant2333 Perhaps we can discuss this topic at the community meeting.

@XiShanYongYe-Chang
Copy link
Member

Hi @Vacant2333 how about discussing this issue at the regular community meeting next Tuesday?

@Vacant2333
Copy link
Contributor Author

Hi @Vacant2333 how about discussing this issue at the regular community meeting next Tuesday?

OK! thank u!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
Status: No status
Development

No branches or pull requests

2 participants