-
Notifications
You must be signed in to change notification settings - Fork 220
feat: field selectors support for InformerEventSource #2835
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
Conversation
closes #2813 |
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros <[email protected]>
informer = | ||
@Informer( | ||
withFields = | ||
@Field(field = "type", value = FieldSelectorTestReconciler.MY_SECRET_TYPE))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a little strange to me to read. Maybe "name" or "key" so it's not @Field(field = ...
but of course this is just recommendation so feel free to discard it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is a bit smelly.
Alternatively, we could have:
@FieldSelector(field="type", value="value", negated=false)
So there would not be with
and without
fields in @Informer
just a list of @FieldSelector
.
We might want to have similar api for java api for informers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@metacosm what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactored it to a more explicit model, PTAL
Signed-off-by: Attila Mészáros <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Way better!
Signed-off-by: Attila Mészáros <[email protected]>
...ator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/informer/Field.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Attila Mészáros <[email protected]>
Signed-off-by: Attila Mészáros [email protected]
closes #2813