Skip to content

Commit

Permalink
Add 'None' as an allowable option for FromNamespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
dprotaso committed Feb 4, 2025
1 parent 04e004b commit 9385dd0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
12 changes: 7 additions & 5 deletions apis/v1/gateway_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -636,21 +636,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"
)

// RouteNamespaces indicate which namespaces Routes should be selected from.
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions config/crd/standard/gateway.networking.k8s.io_gateways.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9385dd0

Please sign in to comment.