From 6f30397e23ed06218896b7e5a0a8dad3368775f3 Mon Sep 17 00:00:00 2001 From: zirain Date: Thu, 30 May 2024 05:07:40 +0800 Subject: [PATCH] fix api nit (#3497) Signed-off-by: zirain --- api/v1alpha1/accesslogging_types.go | 2 +- api/v1alpha1/envoyproxy_metric_types.go | 2 +- api/v1alpha1/ext_auth_types.go | 10 ++++++---- api/v1alpha1/shared_types.go | 2 +- api/v1alpha1/tracing_types.go | 2 +- .../gateway.envoyproxy.io_envoyproxies.yaml | 6 +++--- .../gateway.envoyproxy.io_securitypolicies.yaml | 12 ++++++++---- site/content/en/latest/api/extension_types.md | 14 +++++++------- 8 files changed, 28 insertions(+), 22 deletions(-) diff --git a/api/v1alpha1/accesslogging_types.go b/api/v1alpha1/accesslogging_types.go index 8aafbe9ac0a..4d075bfedaa 100644 --- a/api/v1alpha1/accesslogging_types.go +++ b/api/v1alpha1/accesslogging_types.go @@ -171,7 +171,7 @@ type OpenTelemetryEnvoyProxyAccessLog struct { Port int32 `json:"port,omitempty"` // BackendRefs references a Kubernetes object that represents the // backend server to which the access log will be sent. - // Only service Kind is supported for now. + // Only Service kind is supported for now. // // +optional // +kubebuilder:validation:MaxItems=1 diff --git a/api/v1alpha1/envoyproxy_metric_types.go b/api/v1alpha1/envoyproxy_metric_types.go index 10ba5ad9107..bf321febcbb 100644 --- a/api/v1alpha1/envoyproxy_metric_types.go +++ b/api/v1alpha1/envoyproxy_metric_types.go @@ -70,7 +70,7 @@ type ProxyOpenTelemetrySink struct { Port int32 `json:"port,omitempty"` // BackendRefs references a Kubernetes object that represents the // backend server to which the metric will be sent. - // Only service Kind is supported for now. + // Only Service kind is supported for now. // // +optional // +kubebuilder:validation:MaxItems=1 diff --git a/api/v1alpha1/ext_auth_types.go b/api/v1alpha1/ext_auth_types.go index 906f13c4075..a1cd40bb141 100644 --- a/api/v1alpha1/ext_auth_types.go +++ b/api/v1alpha1/ext_auth_types.go @@ -59,13 +59,14 @@ type ExtAuth struct { type GRPCExtAuthService struct { // BackendRef references a Kubernetes object that represents the // backend server to which the authorization request will be sent. - // Only service Kind is supported for now. + // Only Service kind is supported for now. + // // Deprecated: Use BackendRefs instead. BackendRef *gwapiv1.BackendObjectReference `json:"backendRef,omitempty"` // BackendRefs references a Kubernetes object that represents the // backend server to which the authorization request will be sent. - // Only service Kind is supported for now. + // Only Service kind is supported for now. // // +optional // +kubebuilder:validation:MaxItems=1 @@ -79,13 +80,14 @@ type GRPCExtAuthService struct { type HTTPExtAuthService struct { // BackendRef references a Kubernetes object that represents the // backend server to which the authorization request will be sent. - // Only service Kind is supported for now. + // Only Service kind is supported for now. + // // Deprecated: Use BackendRefs instead. BackendRef *gwapiv1.BackendObjectReference `json:"backendRef,omitempty"` // BackendRefs references a Kubernetes object that represents the // backend server to which the authorization request will be sent. - // Only service Kind is supported for now. + // Only Service kind is supported for now. // // +optional // +kubebuilder:validation:MaxItems=1 diff --git a/api/v1alpha1/shared_types.go b/api/v1alpha1/shared_types.go index 7446ccf368d..4511bd3e8fd 100644 --- a/api/v1alpha1/shared_types.go +++ b/api/v1alpha1/shared_types.go @@ -443,7 +443,7 @@ type KubernetesPatchSpec struct { // BackendRef defines how an ObjectReference that is specific to BackendRef. type BackendRef struct { // BackendObjectReference references a Kubernetes object that represents the backend. - // Only service Kind is supported for now. + // Only Service kind is supported for now. gwapiv1.BackendObjectReference `json:",inline"` } diff --git a/api/v1alpha1/tracing_types.go b/api/v1alpha1/tracing_types.go index ffa33a8c0d4..a2a3f7b5617 100644 --- a/api/v1alpha1/tracing_types.go +++ b/api/v1alpha1/tracing_types.go @@ -51,7 +51,7 @@ type TracingProvider struct { Port int32 `json:"port,omitempty"` // BackendRefs references a Kubernetes object that represents the // backend server to which the trace will be sent. - // Only service Kind is supported for now. + // Only Service kind is supported for now. // // +optional // +kubebuilder:validation:MaxItems=1 diff --git a/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_envoyproxies.yaml b/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_envoyproxies.yaml index b3896406b4c..c8d07451964 100644 --- a/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_envoyproxies.yaml +++ b/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_envoyproxies.yaml @@ -10406,7 +10406,7 @@ spec: description: |- BackendRefs references a Kubernetes object that represents the backend server to which the access log will be sent. - Only service Kind is supported for now. + Only Service kind is supported for now. items: description: BackendRef defines how an ObjectReference that is specific to BackendRef. @@ -10633,7 +10633,7 @@ spec: description: |- BackendRefs references a Kubernetes object that represents the backend server to which the metric will be sent. - Only service Kind is supported for now. + Only Service kind is supported for now. items: description: BackendRef defines how an ObjectReference that is specific to BackendRef. @@ -10829,7 +10829,7 @@ spec: description: |- BackendRefs references a Kubernetes object that represents the backend server to which the trace will be sent. - Only service Kind is supported for now. + Only Service kind is supported for now. items: description: BackendRef defines how an ObjectReference that is specific to BackendRef. diff --git a/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_securitypolicies.yaml b/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_securitypolicies.yaml index ae95d20d10e..30e1b5ffb07 100644 --- a/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_securitypolicies.yaml +++ b/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_securitypolicies.yaml @@ -259,7 +259,9 @@ spec: description: |- BackendRef references a Kubernetes object that represents the backend server to which the authorization request will be sent. - Only service Kind is supported for now. + Only Service kind is supported for now. + + Deprecated: Use BackendRefs instead. properties: group: @@ -339,7 +341,7 @@ spec: description: |- BackendRefs references a Kubernetes object that represents the backend server to which the authorization request will be sent. - Only service Kind is supported for now. + Only Service kind is supported for now. items: description: BackendRef defines how an ObjectReference that is specific to BackendRef. @@ -451,7 +453,9 @@ spec: description: |- BackendRef references a Kubernetes object that represents the backend server to which the authorization request will be sent. - Only service Kind is supported for now. + Only Service kind is supported for now. + + Deprecated: Use BackendRefs instead. properties: group: @@ -531,7 +535,7 @@ spec: description: |- BackendRefs references a Kubernetes object that represents the backend server to which the authorization request will be sent. - Only service Kind is supported for now. + Only Service kind is supported for now. items: description: BackendRef defines how an ObjectReference that is specific to BackendRef. diff --git a/site/content/en/latest/api/extension_types.md b/site/content/en/latest/api/extension_types.md index ebf930be12e..2652b19b7e5 100644 --- a/site/content/en/latest/api/extension_types.md +++ b/site/content/en/latest/api/extension_types.md @@ -1639,8 +1639,8 @@ _Appears in:_ | Field | Type | Required | Description | | --- | --- | --- | --- | -| `backendRef` | _[BackendObjectReference](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1.BackendObjectReference)_ | true | BackendRef references a Kubernetes object that represents the
backend server to which the authorization request will be sent.
Only service Kind is supported for now.
Deprecated: Use BackendRefs instead. | -| `backendRefs` | _[BackendRef](#backendref) array_ | false | BackendRefs references a Kubernetes object that represents the
backend server to which the authorization request will be sent.
Only service Kind is supported for now. | +| `backendRef` | _[BackendObjectReference](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1.BackendObjectReference)_ | true | BackendRef references a Kubernetes object that represents the
backend server to which the authorization request will be sent.
Only Service kind is supported for now.

Deprecated: Use BackendRefs instead. | +| `backendRefs` | _[BackendRef](#backendref) array_ | false | BackendRefs references a Kubernetes object that represents the
backend server to which the authorization request will be sent.
Only Service kind is supported for now. | #### Gateway @@ -1802,8 +1802,8 @@ _Appears in:_ | Field | Type | Required | Description | | --- | --- | --- | --- | -| `backendRef` | _[BackendObjectReference](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1.BackendObjectReference)_ | true | BackendRef references a Kubernetes object that represents the
backend server to which the authorization request will be sent.
Only service Kind is supported for now.
Deprecated: Use BackendRefs instead. | -| `backendRefs` | _[BackendRef](#backendref) array_ | false | BackendRefs references a Kubernetes object that represents the
backend server to which the authorization request will be sent.
Only service Kind is supported for now. | +| `backendRef` | _[BackendObjectReference](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1.BackendObjectReference)_ | true | BackendRef references a Kubernetes object that represents the
backend server to which the authorization request will be sent.
Only Service kind is supported for now.

Deprecated: Use BackendRefs instead. | +| `backendRefs` | _[BackendRef](#backendref) array_ | false | BackendRefs references a Kubernetes object that represents the
backend server to which the authorization request will be sent.
Only Service kind is supported for now. | | `path` | _string_ | true | Path is the path of the HTTP External Authorization service.
If path is specified, the authorization request will be sent to that path,
or else the authorization request will be sent to the root path. | | `headersToBackend` | _string array_ | false | HeadersToBackend are the authorization response headers that will be added
to the original client request before sending it to the backend server.
Note that coexisting headers will be overridden.
If not specified, no authorization response headers will be added to the
original client request. | @@ -2412,7 +2412,7 @@ _Appears in:_ | --- | --- | --- | --- | | `host` | _string_ | false | Host define the extension service hostname.
Deprecated: Use BackendRefs instead. | | `port` | _integer_ | false | Port defines the port the extension service is exposed on.
Deprecated: Use BackendRefs instead. | -| `backendRefs` | _[BackendRef](#backendref) array_ | false | BackendRefs references a Kubernetes object that represents the
backend server to which the access log will be sent.
Only service Kind is supported for now. | +| `backendRefs` | _[BackendRef](#backendref) array_ | false | BackendRefs references a Kubernetes object that represents the
backend server to which the access log will be sent.
Only Service kind is supported for now. | | `resources` | _object (keys:string, values:string)_ | false | Resources is a set of labels that describe the source of a log entry, including envoy node info.
It's recommended to follow [semantic conventions](https://opentelemetry.io/docs/reference/specification/resource/semantic_conventions/). | @@ -2750,7 +2750,7 @@ _Appears in:_ | --- | --- | --- | --- | | `host` | _string_ | false | Host define the service hostname.
Deprecated: Use BackendRefs instead. | | `port` | _integer_ | false | Port defines the port the service is exposed on.
Deprecated: Use BackendRefs instead. | -| `backendRefs` | _[BackendRef](#backendref) array_ | false | BackendRefs references a Kubernetes object that represents the
backend server to which the metric will be sent.
Only service Kind is supported for now. | +| `backendRefs` | _[BackendRef](#backendref) array_ | false | BackendRefs references a Kubernetes object that represents the
backend server to which the metric will be sent.
Only Service kind is supported for now. | #### ProxyPrometheusProvider @@ -3468,7 +3468,7 @@ _Appears in:_ | `type` | _[TracingProviderType](#tracingprovidertype)_ | true | Type defines the tracing provider type.
EG currently only supports OpenTelemetry. | | `host` | _string_ | false | Host define the provider service hostname.
Deprecated: Use BackendRefs instead. | | `port` | _integer_ | false | Port defines the port the provider service is exposed on.
Deprecated: Use BackendRefs instead. | -| `backendRefs` | _[BackendRef](#backendref) array_ | false | BackendRefs references a Kubernetes object that represents the
backend server to which the trace will be sent.
Only service Kind is supported for now. | +| `backendRefs` | _[BackendRef](#backendref) array_ | false | BackendRefs references a Kubernetes object that represents the
backend server to which the trace will be sent.
Only Service kind is supported for now. | #### TracingProviderType