-
Notifications
You must be signed in to change notification settings - Fork 33
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
fix direct reference annotation reconciliation #537
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #537 +/- ##
==========================================
+ Coverage 80.20% 81.01% +0.80%
==========================================
Files 64 71 +7
Lines 4492 4988 +496
==========================================
+ Hits 3603 4041 +438
- Misses 600 639 +39
- Partials 289 308 +19
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
I haven't tried the verification steps, but this looks good... and needed.
Only risk I can think of is that there's no rollback in case of failure mid-step 2 or during step 3. However, and to be fair, this is pretty much the case of most of our reconciliation functions ATM.
🚀
I have been looking at the integration tests failing. The test failed because the tear down ( The process happened as follow:
I think I have fixed the issue in #527. I will make sure the controllers, on handling removal, they do not rely on some order when objects are deleted like when a namespace is deleted. |
* fix direct reference annotation reconciliation * fix lint
What
Found issue with the policies direct references in network resources used to prevent multiple policies (of the same kind) to target the same network resource.
The issue can be reproduced by:
kuadrant.io/ratelimitpolicy
is never deleted and therefore, new policies cannot target Route A.Verification steps
Request an instance of Kuadrant:
Create a HTTPRoute A
Create RLP targeting route A
Checking the direct backreference annotation of the
route-a
gatewayshould give rate limit policy
toystore
default/toystore
Create a new Route B
RLP toystore switches target to Route B
kubectl patch ratelimitpolicy toystore --type=merge --patch '{"spec": {"targetRef": {"name": "route-b"}}}'
Checking the direct backreference annotation of the
route-a
gatewayno, it should be empty
null
Checking the direct backreference annotation of the
route-b
gatewayIs should give rate limit policy
toystore
default/toystore