-
Notifications
You must be signed in to change notification settings - Fork 137
Add support for backend tls config for Gateways #3900
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
Draft
salonichf5
wants to merge
5
commits into
main
Choose a base branch
from
feat/gateway-backendTLS
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
127180b
add tls.backend field to specify gateway cert
salonichf5 ac47d39
update unit tests
salonichf5 f627dae
code reviews
salonichf5 ad0583d
update test paramaters name
salonichf5 6971026
add condition back and update graph tests
salonichf5 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
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 |
---|---|---|
|
@@ -135,6 +135,14 @@ const ( | |
// parametersRef resource is invalid. | ||
GatewayReasonParamsRefInvalid v1.GatewayConditionReason = "ParametersRefInvalid" | ||
|
||
// GatewayReasonSecretRefInvalid is used with the "GatewayResolvedRefs" condition when the | ||
// secretRef resource is invalid. | ||
GatewayReasonSecretRefInvalid v1.GatewayConditionReason = "SecretRefInvalid" | ||
|
||
// GatewayReasonSecretRefNotPermitted is used with the "GatewayResolvedRefs" condition when the | ||
// secretRef resource is not permitted by any ReferenceGrant. | ||
GatewayReasonSecretRefNotPermitted v1.GatewayConditionReason = "SecretRefNotPermitted" | ||
|
||
// PolicyReasonAncestorLimitReached is used with the "PolicyAccepted" condition when a policy | ||
// cannot be applied because the ancestor status list has reached the maximum size of 16. | ||
PolicyReasonAncestorLimitReached v1alpha2.PolicyConditionReason = "AncestorLimitReached" | ||
|
@@ -293,6 +301,27 @@ func NewGatewayClassUnsupportedVersion(recommendedVersion string) []Condition { | |
} | ||
} | ||
|
||
// NewGatewaySecretRefNotPermitted returns Condition that indicates that the Gateway references a TLS secret that is not | ||
// permitted by any ReferenceGrant. | ||
func NewGatewaySecretRefNotPermitted(msg string) Condition { | ||
return Condition{ | ||
Type: string(GatewayReasonResolvedRefs), | ||
Status: metav1.ConditionFalse, | ||
Reason: string(GatewayReasonSecretRefNotPermitted), | ||
Message: msg, | ||
} | ||
} | ||
|
||
// NewGatewaySecretRefInvalid returns Condition that indicates that the Gateway references a TLS secret that is invalid. | ||
func NewGatewaySecretRefInvalid(msg string) Condition { | ||
return Condition{ | ||
Type: string(GatewayReasonResolvedRefs), | ||
Status: metav1.ConditionFalse, | ||
Reason: string(GatewayReasonSecretRefInvalid), | ||
Message: msg, | ||
} | ||
} | ||
|
||
salonichf5 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
// NewGatewayClassConflict returns a Condition that indicates that the GatewayClass is not accepted | ||
// due to a conflict with another GatewayClass. | ||
func NewGatewayClassConflict() Condition { | ||
|
@@ -825,6 +854,25 @@ func NewGatewayInvalid(msg string) []Condition { | |
} | ||
} | ||
|
||
// NewGatewayUnsupportedValue returns Conditions that indicate that a field of the Gateway has an unsupported value. | ||
// Unsupported means that the value is not supported by the implementation or invalid. | ||
func NewGatewayUnsupportedValue(msg string) []Condition { | ||
return []Condition{ | ||
{ | ||
Type: string(v1.GatewayConditionAccepted), | ||
Status: metav1.ConditionFalse, | ||
Reason: string(GatewayReasonUnsupportedValue), | ||
Message: msg, | ||
}, | ||
{ | ||
Type: string(v1.GatewayConditionProgrammed), | ||
Status: metav1.ConditionFalse, | ||
Reason: string(GatewayReasonUnsupportedValue), | ||
Message: msg, | ||
}, | ||
} | ||
} | ||
|
||
Comment on lines
+859
to
+875
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added this back, for tls field not being supported in experimental mode |
||
// NewGatewayUnsupportedAddress returns a Condition that indicates the Gateway is not accepted because it | ||
// contains an address type that is not supported. | ||
func NewGatewayUnsupportedAddress(msg string) Condition { | ||
|
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
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.