Skip to content

Commit

Permalink
Merge pull request #1181 from hashicorp/ref-policy-spec-update
Browse files Browse the repository at this point in the history
Update ReferenceGrant docs to include Gateway -> Secret use case
  • Loading branch information
k8s-ci-robot authored Jun 30, 2022
2 parents be6cb1d + 8623dfb commit 541e9fc
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 70 deletions.
16 changes: 8 additions & 8 deletions apis/v1alpha2/object_reference_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ type SecretObjectReference struct {
// Namespace is the namespace of the backend. When unspecified, the local
// namespace is inferred.
//
// Note that when a namespace is specified, a ReferenceGrant object
// is required in the referent namespace to allow that namespace's
// owner to accept the reference. See the ReferenceGrant documentation
// for details.
// Note that when a different namespace is specified, a ReferenceGrant
// object with ReferenceGrantTo.Kind=Secret is required in the referent
// namespace to allow that namespace's owner to accept the reference.
// See the ReferenceGrant documentation for details.
//
// Support: Core
//
Expand Down Expand Up @@ -112,10 +112,10 @@ type BackendObjectReference struct {
// Namespace is the namespace of the backend. When unspecified, the local
// namespace is inferred.
//
// Note that when a namespace is specified, a ReferenceGrant object
// is required in the referent namespace to allow that namespace's
// owner to accept the reference. See the ReferenceGrant documentation
// for details.
// Note that when a different namespace is specified, a ReferenceGrant
// object with ReferenceGrantTo.Kind=Service is required in the referent
// namespace to allow that namespace's owner to accept the reference.
// See the ReferenceGrant documentation for details.
//
// Support: Core
//
Expand Down
13 changes: 10 additions & 3 deletions apis/v1alpha2/referencegrant_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,14 @@ type ReferenceGrantFrom struct {
Group Group `json:"group"`

// Kind is the kind of the referent. Although implementations may support
// additional resources, the following Route types are part of the "Core"
// support level for this field:
// additional resources, the following types are part of the "Core"
// support level for this field.
//
// When used to permit a SecretObjectReference:
//
// * Gateway
//
// When used to permit a BackendObjectReference:
//
// * HTTPRoute
// * TCPRoute
Expand All @@ -120,7 +126,8 @@ type ReferenceGrantTo struct {
// additional resources, the following types are part of the "Core"
// support level for this field:
//
// * Service
// * Secret when used to permit a SecretObjectReference
// * Service when used to permit a BackendObjectReference
Kind Kind `json:"kind"`

// Name is the name of the referent. When unspecified, this policy
Expand Down
11 changes: 6 additions & 5 deletions config/crd/experimental/gateway.networking.k8s.io_gateways.yaml

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

26 changes: 14 additions & 12 deletions config/crd/experimental/gateway.networking.k8s.io_httproutes.yaml

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.

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

10 changes: 5 additions & 5 deletions config/crd/experimental/gateway.networking.k8s.io_tcproutes.yaml

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

10 changes: 5 additions & 5 deletions config/crd/experimental/gateway.networking.k8s.io_tlsroutes.yaml

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

10 changes: 5 additions & 5 deletions config/crd/experimental/gateway.networking.k8s.io_udproutes.yaml

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

11 changes: 6 additions & 5 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.

26 changes: 14 additions & 12 deletions config/crd/standard/gateway.networking.k8s.io_httproutes.yaml

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

5 changes: 3 additions & 2 deletions site-src/api-types/referencegrant.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,15 @@ safeguards are in place.
ReferenceGrant support is a "CORE" conformance level requirement for
cross-namespace references that originate from the following objects:
- Gateway
- HTTPRoute
- TLSRoute
- TCPRoute
- UDPRoute
That is, all implementations MUST use this flow for any cross namespace
references in any of the core xRoute types, except as noted in the Exceptions
section above.
references in the Gateway and any of the core xRoute types, except as noted
in the Exceptions section above.
Other "ImplementationSpecific" objects and references MUST also use this flow
for cross-namespace references, except as noted in the Exceptions section above.

0 comments on commit 541e9fc

Please sign in to comment.