generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 612
ListenerSet APIs + Generated Clients #3588
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
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
7621a0d
add listenerset types
dprotaso 0743c14
adjust GEP to match go type
dprotaso e50b95f
run deepcopy-gen & register-gen
dprotaso 96002df
perform code generation
dprotaso 9eec244
Add ListenerSetList type
dprotaso 0d0bce1
remove TODO for cel validation that allows an optional port
dprotaso 689db16
add Gateway allowedListeners property
dprotaso 51ae9b2
Add 'None' as an allowable option for FromNamespaces
dprotaso 3ea5a7d
combine into a single client
dprotaso 0041411
fix group name to be x-k8s.io
dprotaso 5b89d98
add a blurb about listener conflict
dprotaso deb01aa
listener names don't need to be unique across listenersets and gateways
dprotaso 9c8a3d8
change use of ListenerSet conditions to a MUST requirement
dprotaso 8451b25
add a Programmed Reason of ParentNotProgrammed
dprotaso 548da37
fix typo
dprotaso f71b298
parentRef is not optional
dprotaso 9e6d365
add a note about Gateway Listener list MAY drop MinItems=1 requirement
dprotaso a422dea
Update GEP to experimental
dprotaso 24ec4d7
update GEP metadata
dprotaso c90bd20
AllowedListeners is no longer a list
dprotaso 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -223,6 +223,8 @@ type GatewaySpec struct { | |
| // Implementations MAY merge separate Gateways onto a single set of | ||
| // Addresses if all Listeners across all Gateways are compatible. | ||
| // | ||
| // In a future release the MinItems=1 requirement MAY be dropped. | ||
| // | ||
| // Support: Core | ||
| // | ||
| // +listType=map | ||
|
|
@@ -279,6 +281,40 @@ type GatewaySpec struct { | |
| // +optional | ||
| // <gateway:experimental> | ||
| BackendTLS *GatewayBackendTLS `json:"backendTLS,omitempty"` | ||
|
|
||
| // AllowedListeners defines which ListenerSets can be attached to this Gateway. | ||
| // While this feature is experimental, the default value is to allow no ListenerSets. | ||
| // | ||
| // <gateway:experimental> | ||
| // | ||
| // +optional | ||
| AllowedListeners *AllowedListeners `json:"allowedListeners,omitempty"` | ||
| } | ||
|
|
||
| // AllowedListeners defines which ListenerSets can be attached to this Gateway. | ||
| type AllowedListeners struct { | ||
| // Namespaces defines which namespaces ListenerSets can be attached to this Gateway. | ||
| // While this feature is experimental, the default value is to allow no ListenerSets. | ||
| // | ||
| // +optional | ||
| // +kubebuilder:default={from: None} | ||
| Namespaces *ListenerNamespaces `json:"namespaces,omitempty"` | ||
| } | ||
dprotaso marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| // ListenerNamespaces indicate which namespaces ListenerSets should be selected from. | ||
| type ListenerNamespaces struct { | ||
| // From indicates where ListenerSets can attach to this Gateway. Possible | ||
| // values are: | ||
| // | ||
| // * Same: Only ListenerSets in the same namespace may be attached to this Gateway. | ||
| // * None: Only listeners defined in the Gateway's spec are allowed | ||
| // | ||
| // While this feature is experimental, the default value None | ||
| // | ||
| // +optional | ||
| // +kubebuilder:default=None | ||
| // +kubebuilder:validation:Enum=Same;None | ||
| From *FromNamespaces `json:"from,omitempty"` | ||
| } | ||
|
|
||
| // Listener embodies the concept of a logical endpoint where a Gateway accepts | ||
|
|
@@ -602,21 +638,23 @@ type AllowedRoutes struct { | |
| Kinds []RouteGroupKind `json:"kinds,omitempty"` | ||
| } | ||
|
|
||
| // FromNamespaces specifies namespace from which Routes may be attached to a | ||
| // FromNamespaces specifies namespace from which Routes/ListenerSets may be attached to a | ||
| // Gateway. | ||
| // | ||
| // +kubebuilder:validation:Enum=All;Selector;Same | ||
| // +kubebuilder:validation:Enum=All;Selector;Same;None | ||
| type FromNamespaces string | ||
|
|
||
| const ( | ||
| // Routes in all namespaces may be attached to this Gateway. | ||
| // Routes/ListenerSets in all namespaces may be attached to this Gateway. | ||
| NamespacesFromAll FromNamespaces = "All" | ||
| // Only Routes in namespaces selected by the selector may be attached to | ||
| // Only Routes/ListenerSets in namespaces selected by the selector may be attached to | ||
| // this Gateway. | ||
| NamespacesFromSelector FromNamespaces = "Selector" | ||
| // Only Routes in the same namespace as the Gateway may be attached to this | ||
| // Only Routes/ListenerSets in the same namespace as the Gateway may be attached to this | ||
| // Gateway. | ||
| NamespacesFromSame FromNamespaces = "Same" | ||
| // No Routes/ListenerSets may be attached to this Gateway. | ||
| NamespacesFromNone FromNamespaces = "None" | ||
|
Contributor
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. @dprotaso what's the user case for |
||
| ) | ||
|
|
||
| // RouteNamespaces indicate which namespaces Routes should be selected from. | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,17 @@ | ||
| /* | ||
| Copyright 2025 The Kubernetes Authors. | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|
|
||
| package apisx |
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,24 @@ | ||
| /* | ||
| Copyright 2025 The Kubernetes Authors. | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|
|
||
| // Package v1alpha1 contains API Schema definitions for the gateway.networking.k8s-x.io | ||
| // API group. | ||
| // | ||
| // +k8s:openapi-gen=true | ||
| // +kubebuilder:object:generate=true | ||
| // +groupName=gateway.networking.x-k8s.io | ||
| // +groupGoName=Experimental | ||
| package v1alpha1 |
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.