-
Notifications
You must be signed in to change notification settings - Fork 143
Implement ProxySettingsPolicy #4286
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
base: feat/proxy-settings-policy
Are you sure you want to change the base?
Conversation
sjberman
left a comment
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.
Nice work!
|
|
||
| // parseNginxSize parses an NGINX size string (e.g., "8k", "16m", "1024") and returns the size in bytes. | ||
| // Returns an error if the size string is invalid. | ||
| func parseNginxSize(size string) (int64, error) { |
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.
Can we have a dedicated unit test for this function?
| // HTTP2 should be enabled by default | ||
| HTTP2: true, | ||
| IPFamily: Dual, | ||
| Policies: buildPolicies(gateway, gateway.Policies), |
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.
Is this going to build client settings policies objects too and attach to this struct?
| // PolicyAffectedReason is used with the "PolicyAffected" condition when a | ||
| // ObservabilityPolicy or ClientSettingsPolicy is applied to Gateways or Routes. | ||
| // ObservabilityPolicy, ClientSettingsPolicy, or ProxySettingsPolicy is applied to Gateways or Routes. |
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.
Does PolicyAffectedReason only apply to these three policies?
Proposed changes
Problem: We need to implement the ProxySettingsPolicy API
Solution: Implement ProxySettingsPolicy
Manual Testing: Tested using the example files provided which will be the basis of the documentation:
Steps (using the provided examples):
Also tested the validation works as expected.
Note that the
Programmedstatus implementation, CEL, and functional testing will all be done in follow up PRsCloses #4261
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.