-
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 UpstreamSettingsPolicy CRD #2515
Add UpstreamSettingsPolicy CRD #2515
Conversation
Would like a review on the validation of fields, then I will test that the CRD can be installed and validation works. Then I will promote the PR to be ready for review. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature/upstream-settings-policy #2515 +/- ##
=================================================================
Coverage 89.34% 89.34%
=================================================================
Files 100 100
Lines 7628 7628
Branches 50 50
=================================================================
Hits 6815 6815
Misses 756 756
Partials 57 57 ☔ View full report in Codecov by Sentry. |
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.
Just one small change to validation
The design doc does mention adding the |
Let's handle that separately. I can create an issue for it. |
Manually tested that current validation works. |
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.
LGTM 🚀
@bjee19 Shouldn't we include an example of how the CRD looks like? |
I don't think we need to, but if you have an example @bjee19 it wouldn't hurt to add it. I recommend doing something like this: https://github.com/nginxinc/nginx-gateway-fabric/tree/feature/snippets-filter/examples/snippets-filter |
Looking at the default for keepalive time being 1 hour here https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_time our current Duration definition we use here:
seems to only be in seconds to milliseconds. This is an issue right? Does this affect other policies whose duration are longer and yet are being limited to be seconds or ms such as ClientSettingsPolicy's keepalive time here: https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_time |
@bjee19 good find and question. This came up on the PR for adding the ClientSettingsPolicy CRD, and we decided to support only ms and s: #1793 (comment). Looking back at all the fields that use this type, ms and s work make sense for everything except It's not a problem, per se, since you can express hours in seconds, but it's inconvenient. Let's change the validation on Duration to |
I see, thanks for explaining and giving me more background. Since this PR is going into a feature branch, should I make the change to the Duration validation in a separate PR targeting main? Also, would it be beneficial to cherry-pick that PR onto the recent release? |
This reverts commit 5876f59.
013b85c
to
186f2bf
Compare
✅ All required contributors have signed the F5 CLA for this PR. Thank you! |
I have hereby read the F5 CLA and agree to its terms |
I messed some stuff up with the feature branch, i created it a while ago so it was quite behind main. When I rebased my local branch with main and didn't update the feature branch stuff got messed up. Things should be fixed. |
Yes, let's fix in a separate PR that targets main. No, we don't need to cherry-pick it to the release branch. That would require a patch release, which this issue doesn't warrant. |
1de9408
into
nginxinc:feature/upstream-settings-policy
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.
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.
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.
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.
Proposed changes
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.
Closes #2502
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.