-
Notifications
You must be signed in to change notification settings - Fork 250
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
How to define two traits are conflict? #352
Comments
I would recommend a design similar to inter-pod anti-affinity:
|
We also need to define category of traits as we already did internal Alibaba. A labelSelector style solution seems good. I will still suggest consider OPA as the policy engine though. |
Could we use some banlist and allowlist to define the conflict traits slice? |
@zhangxiaoyu-zidif As OAM supports extended traits contributed by other developers, the whole trait list is hard to be complete, nor will it easy to fill items in the whitelist and blacklist, I think. |
@zzxwill Correct, so I fancy is that possible to create some custom traits(as custom resource does), and make some patterns to rule them. I can not picture how to work currently, but I will trace this issue and join related discussions later. :) |
@zhangxiaoyu-zidif Maybe the Trait catalog can help:) |
Can you see review my specific implementation plan? @wonderflow
You can see that the traitRelation field is filled。
1) We can find the Definition of the trait through the labelSelector field.
|
@linjiemiao Can you follow this design crossplane/oam-kubernetes-runtime#141 (comment) |
Our Traits are loosely coupled which means a user or platform builder can easily add a trait for some kinds of workload.
But we can't recognize whether a new trait will conflict with an existing trait.
For possible way to solve this is to add a label or something to mark, and traits with same marks will be recognize as conflict. For example:
When we find two traits which has same conflictLabel, we could say they are conflict and deny it from admission webhook.
The text was updated successfully, but these errors were encountered: