-
Notifications
You must be signed in to change notification settings - Fork 98
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
Add UpstreamSetttingsPolicy #2941
Conversation
Problem: Users want to configure the behavior of the connection between NGINX and their upstream applications. Solution: Add the UpstreamSettingsPolicy CRD, which is a direct policy that will attach to a Service that is referenced in an HTTPRoute or GRPCRoute. Testing: Tested that validation works.
Translate data plane intermediary UpstreamSettingsPolicy configuration into NGINX configuration. Problem: I want the data plane configuration generated from my UpstreamSettingsPolicy to be translated into NGINX Configuration. Solution: Translate the data plane UpstreamSettingsPolicy configuration into NGINX configuration. Testing: Unit tests.
…tion (#2887) Problem: As a userI want NGF to take my configuration for an UpstreamSettingsPolicy and transform it into data plane configuration within NGF, so that NGF can then translate those settings into NGINX configuration, and so that NGF maintains an abstraction layer between data plane configuration and the specific data plane NGF uses. Solution: Add controller to watch UpstreamSettingsPolicies, and store them in the cluster state as generic NGF Policies. Update the graph to validate and process these policies and attach them to the relevant Services. When building the dataplane configuration, store the policies on the relevant http upstreams.
Problem: Want to collect number of UpstreamSettingsPolicies in cluster. Solution: Collect the count of UpstreamSettingsPolicies in cluster.
Problem: When an UpstreamSettingsPolicy targeted multiple Services, NGF would write duplicate ancestors to its status. Solution: Only add unique ancestors to policy ancestors list.
Functional Tests for UpstreamSettings Policy.
a8120ca
to
b0ed7e2
Compare
✅ Deploy Preview will be available once build job completes!
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2941 +/- ##
==========================================
+ Coverage 89.74% 89.93% +0.18%
==========================================
Files 109 111 +2
Lines 11150 11421 +271
Branches 50 50
==========================================
+ Hits 10007 10271 +264
- Misses 1083 1089 +6
- Partials 60 61 +1 ☔ View full report in Codecov by Sentry. |
@kate-osborn When merging, can you make sure @bjee19 and @salonichf5 are also listed as contributors? Everyone deserves their credit :) |
Of course! Thanks for the reminder |
Proposed changes
Problem: As a user, I want to be able to configure the upstream settings for a Service referenced by a HTTP or GRPCRoute.
Solution: Add UpstreamSettingsPolicy CRD. This is a direct policy that can be attached to one or more Services.
The Service must be referenced by an HTTP or GRPCRoute that is owned by the "winning" NGF Gateway.
Testing: Unit, manual, and automated functional tests.
Checklist
Before creating a PR, run through this checklist and mark each as complete.
Release notes
If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.