Skip to content

Commit 6a8738a

Browse files
authored
Merge pull request #1594 from youngnick/973-fix
Update ParentRef wording
2 parents dc314b1 + 05fa505 commit 6a8738a

8 files changed

+170
-16
lines changed

apis/v1alpha2/shared_types.go

+6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ import (
2525
// with "Core" support is Gateway. This API may be extended in the future to
2626
// support additional kinds of parent resources, such as HTTPRoute.
2727
//
28+
// Note that there are specific rules for ParentRefs which cross namespace
29+
// boundaries. Cross-namespace references are only valid if they are explicitly
30+
// allowed by something in the namespace they are referring to. For example:
31+
// Gateway has the AllowedRoutes field, and ReferenceGrant provides a
32+
// generic way to enable any other kind of cross-namespace reference.
33+
//
2834
// The API object must be valid in the cluster; the Group and Kind must
2935
// be registered in the cluster for this reference to be valid.
3036
// +k8s:deepcopy-gen=false

apis/v1beta1/shared_types.go

+12
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ type ParentReference struct {
5252
// Namespace is the namespace of the referent. When unspecified, this refers
5353
// to the local namespace of the Route.
5454
//
55+
// Note that there are specific rules for ParentRefs which cross namespace
56+
// boundaries. Cross-namespace references are only valid if they are explicitly
57+
// allowed by something in the namespace they are referring to. For example:
58+
// Gateway has the AllowedRoutes field, and ReferenceGrant provides a
59+
// generic way to enable any other kind of cross-namespace reference.
60+
//
5561
// Support: Core
5662
//
5763
// +optional
@@ -140,6 +146,12 @@ type CommonRouteSpec struct {
140146
// case, the list of routes attached to those resources should also be
141147
// merged.
142148
//
149+
// Note that for ParentRefs that cross namespace boundaries, there are specific
150+
// rules. Cross-namespace references are only valid if they are explicitly
151+
// allowed by something in the namespace they are referring to. For example,
152+
// Gateway has the AllowedRoutes field, and ReferenceGrant provides a
153+
// generic way to enable any other kind of cross-namespace reference.
154+
//
143155
// +optional
144156
// +kubebuilder:validation:MaxItems=32
145157
ParentRefs []ParentReference `json:"parentRefs,omitempty"`

config/crd/experimental/gateway.networking.k8s.io_grpcroutes.yaml

+19-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/experimental/gateway.networking.k8s.io_httproutes.yaml

+38-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/experimental/gateway.networking.k8s.io_tcproutes.yaml

+19-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/experimental/gateway.networking.k8s.io_tlsroutes.yaml

+19-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/experimental/gateway.networking.k8s.io_udproutes.yaml

+19-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)