-
Notifications
You must be signed in to change notification settings - Fork 96
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
ReferenceGrant from Gateway to Secret #791
Conversation
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 means we will regenerate nginx config every time a ReferenceGrant is created, updated (generation must change), or deleted, even if it does not apply to the accepted Gateway.
do we need to track these things somewhere? so that we know about them when the time comes to reduce number of reloads.
We have this issue which I think covers it: #552 |
f33f8f0
to
fd58b71
Compare
Co-authored-by: Saylor Berman <[email protected]>
fd58b71
to
d7d4cd0
Compare
Proposed changes
Problem: NKG does not support cross-namespace Secret references on Gateway.
Solution: Add support for ReferenceGrants that permit Gateways to reference Secrets in different namespaces. NKG now processes ReferenceGrants and verifies that Gateways with references to Secrets in different Namespaces have a corresponding ReferenceGrant. If no ReferenceGrant exists, the
RefNotPermitted
reason is used in all the listener conditions (Accepted, Programmed, and ResolvedRefs), and the listener is marked invalid. Secrets will only be resolved if the reference is permitted. No additional validation is needed for ReferenceGrant as it does not correspond to any nginx config. We treat every upsert/delete of a ReferenceGrant as a change. This means we will regenerate nginx config every time a ReferenceGrant is created, updated (generation must change), or deleted, even if it does not apply to the accepted Gateway.Testing: 100% unit test coverage of new functions, updated existing unit tests, and verified that the applicable conformance test pass.
Closes #694
Checklist
Before creating a PR, run through this checklist and mark each as complete.