-
Notifications
You must be signed in to change notification settings - Fork 594
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
Spike: disentangle the store, controllers, and annotations code for class matching #853
Comments
Some initial comments from @mflendrich pulled out of Slack convo:
|
@Kong/team-k8s we recently did a code pairing that was relevant to this one, just wanted to check in on this one do we have existing code or is anyone actively working on this? |
The pairing ended up addressing a different issue (testing something related). Not started yet, but I think we should keep this around because of how annoying it is. The OP is now somewhat out of date, and doesn't cover that there's now an additional filter in the controllers, which duplicate the store's filter functionality and has its own set of helper functions, so the original in-store implementation should be possible to discard entirely. There's hopefully a simple solution (discard filtering in the store altogether, write/review integration tests that confirm that we don't ingest wrong-class resources) so it could be a good onboarding project to gain some familiarity with the store and its relationship to the controllers. May need more in-depth assistance if it turns out being more difficult (the tests fail after removing the store filters). |
reviewing this it sounds like we need to spike this to figure out what actually should be done to solve the problem, and how long that solution will take. |
Closed because it's huge. Likely other, more narrowly targeted, efforts to improve the parser/translate code will likely partially resolve this. Let's reopen if there's a good, promising way to fix this. |
Summary
The existing implementation for filtering resources with the correct ingress class annotation or native class has poor separation between the store and annotations code. Store loads in a lot of annotations code that it ideally shouldn't. We should explore options for making the separation cleaner, which should allow for easier changes to this implementation in the future.
Background
#843 works, but is a mess. Key pain points/oddness items for me were:
store.New()
to toggle class behavior per-object.--watch-namespace
flags to a single controller instance.validIngress
), and was always more related to a single specific annotation (ingress.class
) than annotations in general.The text was updated successfully, but these errors were encountered: