Skip to content

Commit 541e9fc

Browse files
authored
Merge pull request #1181 from hashicorp/ref-policy-spec-update
Update ReferenceGrant docs to include Gateway -> Secret use case
2 parents be6cb1d + 8623dfb commit 541e9fc

12 files changed

+92
-70
lines changed

apis/v1alpha2/object_reference_types.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ type SecretObjectReference struct {
6565
// Namespace is the namespace of the backend. When unspecified, the local
6666
// namespace is inferred.
6767
//
68-
// Note that when a namespace is specified, a ReferenceGrant object
69-
// is required in the referent namespace to allow that namespace's
70-
// owner to accept the reference. See the ReferenceGrant documentation
71-
// for details.
68+
// Note that when a different namespace is specified, a ReferenceGrant
69+
// object with ReferenceGrantTo.Kind=Secret is required in the referent
70+
// namespace to allow that namespace's owner to accept the reference.
71+
// See the ReferenceGrant documentation for details.
7272
//
7373
// Support: Core
7474
//
@@ -112,10 +112,10 @@ type BackendObjectReference struct {
112112
// Namespace is the namespace of the backend. When unspecified, the local
113113
// namespace is inferred.
114114
//
115-
// Note that when a namespace is specified, a ReferenceGrant object
116-
// is required in the referent namespace to allow that namespace's
117-
// owner to accept the reference. See the ReferenceGrant documentation
118-
// for details.
115+
// Note that when a different namespace is specified, a ReferenceGrant
116+
// object with ReferenceGrantTo.Kind=Service is required in the referent
117+
// namespace to allow that namespace's owner to accept the reference.
118+
// See the ReferenceGrant documentation for details.
119119
//
120120
// Support: Core
121121
//

apis/v1alpha2/referencegrant_types.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,14 @@ type ReferenceGrantFrom struct {
9292
Group Group `json:"group"`
9393

9494
// Kind is the kind of the referent. Although implementations may support
95-
// additional resources, the following Route types are part of the "Core"
96-
// support level for this field:
95+
// additional resources, the following types are part of the "Core"
96+
// support level for this field.
97+
//
98+
// When used to permit a SecretObjectReference:
99+
//
100+
// * Gateway
101+
//
102+
// When used to permit a BackendObjectReference:
97103
//
98104
// * HTTPRoute
99105
// * TCPRoute
@@ -120,7 +126,8 @@ type ReferenceGrantTo struct {
120126
// additional resources, the following types are part of the "Core"
121127
// support level for this field:
122128
//
123-
// * Service
129+
// * Secret when used to permit a SecretObjectReference
130+
// * Service when used to permit a BackendObjectReference
124131
Kind Kind `json:"kind"`
125132

126133
// Name is the name of the referent. When unspecified, this policy

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

Lines changed: 6 additions & 5 deletions
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

Lines changed: 14 additions & 12 deletions
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_referencegrants.yaml

Lines changed: 8 additions & 4 deletions
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_referencepolicies.yaml

Lines changed: 8 additions & 4 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 5 additions & 5 deletions
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

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/standard/gateway.networking.k8s.io_gateways.yaml

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 14 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site-src/api-types/referencegrant.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,15 @@ safeguards are in place.
121121
ReferenceGrant support is a "CORE" conformance level requirement for
122122
cross-namespace references that originate from the following objects:
123123
124+
- Gateway
124125
- HTTPRoute
125126
- TLSRoute
126127
- TCPRoute
127128
- UDPRoute
128129
129130
That is, all implementations MUST use this flow for any cross namespace
130-
references in any of the core xRoute types, except as noted in the Exceptions
131-
section above.
131+
references in the Gateway and any of the core xRoute types, except as noted
132+
in the Exceptions section above.
132133
133134
Other "ImplementationSpecific" objects and references MUST also use this flow
134135
for cross-namespace references, except as noted in the Exceptions section above.

0 commit comments

Comments
 (0)