Questo contenuto non è disponibile nella lingua selezionata.
Chapter 28. ReferenceGrant [gateway.networking.k8s.io/v1beta1]
- Description
ReferenceGrant identifies kinds of resources in other namespaces that are trusted to reference the specified kinds of resources in the same namespace as the policy.
Each ReferenceGrant can be used to represent a unique trust relationship. Additional Reference Grants can be used to add to the set of trusted sources of inbound references for the namespace they are defined within.
All cross-namespace references in Gateway API (with the exception of cross-namespace Gateway-route attachment) require a ReferenceGrant.
ReferenceGrant is a form of runtime verification allowing users to assert which cross-namespace object references are permitted. Implementations that support ReferenceGrant MUST NOT permit cross-namespace references which have no grant, and MUST respond to the removal of a grant by revoking the access that the grant allowed.
- Type
-
object
28.1. Specification Copia collegamentoCollegamento copiato negli appunti!
Property | Type | Description |
---|---|---|
|
| APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources |
|
| Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds |
| Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata | |
|
| Spec defines the desired state of ReferenceGrant. |
28.1.1. .spec Copia collegamentoCollegamento copiato negli appunti!
- Description
- Spec defines the desired state of ReferenceGrant.
- Type
-
object
- Required
-
from
-
to
-
Property | Type | Description |
---|---|---|
|
| From describes the trusted namespaces and kinds that can reference the resources described in "To". Each entry in this list MUST be considered to be an additional place that references can be valid from, or to put this another way, entries MUST be combined using OR. Support: Core |
|
| ReferenceGrantFrom describes trusted namespaces and kinds. |
|
| To describes the resources that may be referenced by the resources described in "From". Each entry in this list MUST be considered to be an additional place that references can be valid to, or to put this another way, entries MUST be combined using OR. Support: Core |
|
| ReferenceGrantTo describes what Kinds are allowed as targets of the references. |
28.1.2. .spec.from Copia collegamentoCollegamento copiato negli appunti!
- Description
From describes the trusted namespaces and kinds that can reference the resources described in "To". Each entry in this list MUST be considered to be an additional place that references can be valid from, or to put this another way, entries MUST be combined using OR.
Support: Core
- Type
-
array
28.1.3. .spec.from[] Copia collegamentoCollegamento copiato negli appunti!
- Description
- ReferenceGrantFrom describes trusted namespaces and kinds.
- Type
-
object
- Required
-
group
-
kind
-
namespace
-
Property | Type | Description |
---|---|---|
|
| Group is the group of the referent. When empty, the Kubernetes core API group is inferred. Support: Core |
|
| Kind is the kind of the referent. Although implementations may support 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: * GRPCRoute * HTTPRoute * TCPRoute * TLSRoute * UDPRoute |
|
| Namespace is the namespace of the referent. Support: Core |
28.1.4. .spec.to Copia collegamentoCollegamento copiato negli appunti!
- Description
To describes the resources that may be referenced by the resources described in "From". Each entry in this list MUST be considered to be an additional place that references can be valid to, or to put this another way, entries MUST be combined using OR.
Support: Core
- Type
-
array
28.1.5. .spec.to[] Copia collegamentoCollegamento copiato negli appunti!
- Description
- ReferenceGrantTo describes what Kinds are allowed as targets of the references.
- Type
-
object
- Required
-
group
-
kind
-
Property | Type | Description |
---|---|---|
|
| Group is the group of the referent. When empty, the Kubernetes core API group is inferred. Support: Core |
|
| Kind is the kind of the referent. Although implementations may support additional resources, the following types are part of the "Core" support level for this field: * Secret when used to permit a SecretObjectReference * Service when used to permit a BackendObjectReference |
|
| Name is the name of the referent. When unspecified, this policy refers to all resources of the specified Group and Kind in the local namespace. |
28.2. API endpoints Copia collegamentoCollegamento copiato negli appunti!
The following API endpoints are available:
/apis/gateway.networking.k8s.io/v1beta1/referencegrants
-
GET
: list objects of kind ReferenceGrant
-
/apis/gateway.networking.k8s.io/v1beta1/namespaces/{namespace}/referencegrants
-
DELETE
: delete collection of ReferenceGrant -
GET
: list objects of kind ReferenceGrant -
POST
: create a ReferenceGrant
-
/apis/gateway.networking.k8s.io/v1beta1/namespaces/{namespace}/referencegrants/{name}
-
DELETE
: delete a ReferenceGrant -
GET
: read the specified ReferenceGrant -
PATCH
: partially update the specified ReferenceGrant -
PUT
: replace the specified ReferenceGrant
-
28.2.1. /apis/gateway.networking.k8s.io/v1beta1/referencegrants Copia collegamentoCollegamento copiato negli appunti!
- HTTP method
-
GET
- Description
- list objects of kind ReferenceGrant
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
28.2.2. /apis/gateway.networking.k8s.io/v1beta1/namespaces/{namespace}/referencegrants Copia collegamentoCollegamento copiato negli appunti!
- HTTP method
-
DELETE
- Description
- delete collection of ReferenceGrant
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
GET
- Description
- list objects of kind ReferenceGrant
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
POST
- Description
- create a ReferenceGrant
Parameter | Type | Description |
---|---|---|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
Parameter | Type | Description |
---|---|---|
|
|
HTTP code | Reponse body |
---|---|
200 - OK |
|
201 - Created |
|
202 - Accepted |
|
401 - Unauthorized | Empty |
28.2.3. /apis/gateway.networking.k8s.io/v1beta1/namespaces/{namespace}/referencegrants/{name} Copia collegamentoCollegamento copiato negli appunti!
Parameter | Type | Description |
---|---|---|
|
| name of the ReferenceGrant |
- HTTP method
-
DELETE
- Description
- delete a ReferenceGrant
Parameter | Type | Description |
---|---|---|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
HTTP code | Reponse body |
---|---|
200 - OK |
|
202 - Accepted |
|
401 - Unauthorized | Empty |
- HTTP method
-
GET
- Description
- read the specified ReferenceGrant
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
PATCH
- Description
- partially update the specified ReferenceGrant
Parameter | Type | Description |
---|---|---|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
PUT
- Description
- replace the specified ReferenceGrant
Parameter | Type | Description |
---|---|---|
|
| When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed |
|
| fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered. |
Parameter | Type | Description |
---|---|---|
|
|
HTTP code | Reponse body |
---|---|
200 - OK |
|
201 - Created |
|
401 - Unauthorized | Empty |