-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement ClientSettingsPolicy (#1940)
Problems: - As a Cluster Operator, I want to set defaults for client settings that will work for most applications so that most Application Developers will not have to tweak these settings. - As an Application Developer, I want to be able to configure client settings for my application based on its behavior or requirements. - As an Application Developer, I want to override the defaults for client settings set by the Cluster Operator because the defaults do not satisfy my application's requirements or behavior. Solution: Implement ClientSettingsPolicy API. - Cluster operators can create a ClientSettingsPolicy for a Gateway to set defaults for client settings that apply to all routes attached to that Gateway. - App devs can create ClientSettingsPolicies for their routes and specify client settings that override the defaults set by the cluster operator.
- Loading branch information
1 parent
9212c4b
commit 10bae0b
Showing
92 changed files
with
7,708 additions
and
471 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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 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 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 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 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.