-
Notifications
You must be signed in to change notification settings - Fork 126
Implement ClientSettingsPolicy #1940
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
Merged
kate-osborn
merged 38 commits into
nginx:main
from
kate-osborn:enh/client-settings-policy
May 20, 2024
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
c953477
Implement ClientSettingsPolicy Attachment
b5a13a4
Change example files
294b347
Mark proposal as completed
7eeb012
Generate CRDs
b9f0c13
Remove PolicyAncestorRef
530cf7d
Use v1 ParentRef
77fd3ae
Update template formatting
cb2cb7f
Move routeKeyForKind
23c2465
Fix route type in test
41517dc
Add constant for ancestor max
ca228aa
Reduce rbac privs
da6afda
Add test to the names of test functions
a2e42d3
Fix comment for sort.ClientObject
65eb514
Remove newline
08e53b9
Add comments to RouteKey fields
f3938cf
Add space after includes and before locations
e6ea1bd
Add CEL validation for target ref kind
4b7e914
Add CEL validation for target ref group
fadd9e5
Remove content from Include
dbebb53
testData -> assertData
1a461aa
use real upstream in test
24e6507
Remove unnecessary validation
5986149
Extract function for adding includes to locations
a0d0c5f
Create MustExtractGVK type
0a172d1
Small fixes
f045cc7
Generate CRDs
f71d296
Add fixme
4ca2334
Run generate manifests
b37f578
Make Includes a list of strings
a287332
Refactor change processor to accept MustExtractGVK
d37c2da
Panic if addition is nil
4412a21
Use MustcastObject helper method
2d3c364
Fix condition type
f25e9fd
Address issues with sort package and tests
c28a52b
Addition does not need to be a pointer
c071435
Panic when policy is nil in isrelevant
5c41398
Simplify ancestorsFull
2842083
Reinstate header/server validation
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package v1alpha1 | ||
|
||
import ( | ||
"sigs.k8s.io/gateway-api/apis/v1alpha2" | ||
) | ||
|
||
// FIXME(kate-osborn): https://github.com/nginxinc/nginx-gateway-fabric/issues/1939. | ||
// Figure out a way to generate these methods for all our policies. | ||
// These methods implement the policies.Policy interface which extends client.Object to add the following methods. | ||
|
||
func (p *ClientSettingsPolicy) GetTargetRef() v1alpha2.LocalPolicyTargetReference { | ||
return p.Spec.TargetRef | ||
} | ||
|
||
func (p *ClientSettingsPolicy) GetPolicyStatus() v1alpha2.PolicyStatus { | ||
return p.Status | ||
} | ||
|
||
func (p *ClientSettingsPolicy) SetPolicyStatus(status v1alpha2.PolicyStatus) { | ||
p.Status = status | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Client Settings Policy | ||
|
||
This directory contains YAML files of ClientSettingsPolicies. | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.