diff --git a/apis/v1alpha1/clientsettingspolicy_types.go b/apis/v1alpha1/clientsettingspolicy_types.go index 541b496bbc..e4497e4521 100644 --- a/apis/v1alpha1/clientsettingspolicy_types.go +++ b/apis/v1alpha1/clientsettingspolicy_types.go @@ -5,6 +5,7 @@ import ( gatewayv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2" ) +// +genclient // +kubebuilder:object:root=true // +kubebuilder:storageversion // +kubebuilder:subresource:status diff --git a/apis/v1alpha1/nginxgateway_types.go b/apis/v1alpha1/nginxgateway_types.go index ad1e57b4c0..f6c16f6a42 100644 --- a/apis/v1alpha1/nginxgateway_types.go +++ b/apis/v1alpha1/nginxgateway_types.go @@ -2,6 +2,7 @@ package v1alpha1 import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +// +genclient // +kubebuilder:object:root=true // +kubebuilder:storageversion // +kubebuilder:subresource:status diff --git a/apis/v1alpha1/nginxproxy_types.go b/apis/v1alpha1/nginxproxy_types.go index a91c585e59..2c2a125946 100644 --- a/apis/v1alpha1/nginxproxy_types.go +++ b/apis/v1alpha1/nginxproxy_types.go @@ -2,6 +2,7 @@ package v1alpha1 import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +// +genclient // +kubebuilder:object:root=true // +kubebuilder:storageversion // +kubebuilder:resource:categories=nginx-gateway-fabric,scope=Cluster diff --git a/apis/v1alpha1/observabilitypolicy_types.go b/apis/v1alpha1/observabilitypolicy_types.go index 22cb36688a..63a5b52758 100644 --- a/apis/v1alpha1/observabilitypolicy_types.go +++ b/apis/v1alpha1/observabilitypolicy_types.go @@ -5,6 +5,7 @@ import ( gatewayv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2" ) +// +genclient // +kubebuilder:object:root=true // +kubebuilder:storageversion // +kubebuilder:subresource:status @@ -27,7 +28,6 @@ type ObservabilityPolicy struct { } // +kubebuilder:object:root=true - // ObservabilityPolicyList contains a list of ObservabilityPolicies. type ObservabilityPolicyList struct { metav1.TypeMeta `json:",inline"` diff --git a/site/config/api/pkg.tpl b/site/config/api/pkg.tpl index 1bb2881158..7ca2d3ed56 100644 --- a/site/config/api/pkg.tpl +++ b/site/config/api/pkg.tpl @@ -3,7 +3,7 @@ title: "API Reference" description: "NGINX Gateway API Reference" weight: 100 -toc: true +toc: false --- {{ with .packages}} @@ -24,15 +24,13 @@ toc: true {{ with (index .GoPackages 0 )}} {{ with .DocComments }} -
{{ safe (renderComments .) }} -
{{.Underlying}}
alias){{ end -}}
+ {{ if eq .Kind "Alias" }}({{.Underlying}}
alias){{ end -}}
+ ¶
(Appears on: {{- $prev := "" -}} {{- range . -}} - {{- if $prev -}}, {{ end -}} - {{- $prev = . -}} + {{- if $prev -}},{{ end -}} + {{ $prev = . }} {{ typeDisplayName . }} {{- end -}} )
{{ end }} -{{ safe (renderComments .CommentLines) }} -
-maxSize + apiVersion +string |
+
+
+gateway.nginx.org/v1alpha1
+
+ |
+||||||
+kind +string + |
+ClientSettingsPolicy |
+||||||
+metadata - -Size + +Kubernetes meta/v1.ObjectMeta + + + |
+
+Refer to the Kubernetes API documentation for the fields of the
+metadata field.
+ |
+||||||
+spec + + +ClientSettingsPolicySpec + + + |
+
+ Spec defines the desired state of the ClientSettingsPolicy. ++ +
|
+||||||
+status + + +sigs.k8s.io/gateway-api/apis/v1alpha2.PolicyStatus + + + |
+
+ Status defines the state of the ClientSettingsPolicy. |
-(Appears on: ClientSettingsPolicySpec) +
NginxGateway represents the dynamic configuration for an NGINX Gateway Fabric control plane.
-ClientKeepAlive defines the keep-alive settings for clients.
-
-(Optional)
- Requests sets the maximum number of requests that can be served through one keep-alive connection. -After the maximum number of requests are made, the connection is closed. Closing connections periodically -is necessary to free per-connection memory allocations. Therefore, using too high maximum number of requests -is not recommended as it can lead to excessive memory usage. -Default: https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_requests. +Refer to the Kubernetes API documentation for the fields of the +metadata field.
|
|||
-time + spec - -Duration + +NginxGatewaySpec + + + |
+
+ NginxGatewaySpec defines the desired state of the NginxGateway. ++ +
|
||
-timeout + status - -ClientKeepAliveTimeout + +NginxGatewayStatus |
-(Optional)
- Timeout defines the keep-alive timeouts for clients. +NginxGatewayStatus defines the state of the NginxGateway. |
-(Appears on: ClientKeepAlive) +
NginxProxy is a configuration object that is attached to a GatewayClass parametersRef. It provides a way +to configure global settings for all Gateways defined from the GatewayClass.
-ClientKeepAliveTimeout defines the timeouts related to keep-alive client connections. -Default: Default: https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout.
-
-(Optional)
- Server sets the timeout during which a keep-alive client connection will stay open on the server side. -Setting this value to 0 disables keep-alive client connections. +Refer to the Kubernetes API documentation for the fields of the +metadata field.
|
|||||
-header + spec - -Duration + +NginxProxySpec + + + |
+
+ Spec defines the desired state of the NginxProxy. ++ +
|
ClientSettingsPolicy is an Inherited Attached Policy. It provides a way to configure the behavior of the connection -between the client and NGINX Gateway Fabric.
-+
ObservabilityPolicy is a Direct Attached Policy. It provides a way to configure observability settings for +the NGINX Gateway Fabric data plane. Used in conjunction with the NginxProxy CRD that is attached to the +GatewayClass parametersRef.
+
+apiVersion +string |
+
+
+gateway.nginx.org/v1alpha1
+
+ |
+|||||
+kind +string + |
+ObservabilityPolicy |
+|||||
metadata @@ -214,85 +380,245 @@ Refer to the Kubernetes API documentation for the fields of the
|
spec - -ClientSettingsPolicySpec + +ObservabilityPolicySpec
- |
+Spec defines the desired state of the ClientSettingsPolicy. +Spec defines the desired state of the ObservabilityPolicy.
| ||||
+status + + +sigs.k8s.io/gateway-api/apis/v1alpha2.PolicyStatus + + + |
+
+ Status defines the state of the ObservabilityPolicy. + |
+
+(Appears on: +ClientSettingsPolicySpec) +
++
ClientBody contains the settings for the client request body.
+ +Field | +Description | +
---|---|
+maxSize + + +Size |
(Optional)
- KeepAlive defines the keep-alive settings. +MaxSize sets the maximum allowed size of the client request body. +If the size in a request exceeds the configured value, +the 413 (Request Entity Too Large) error is returned to the client. +Setting size to 0 disables checking of client request body size. +Default: https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size. |
-targetRef + timeout - -sigs.k8s.io/gateway-api/apis/v1alpha2.LocalPolicyTargetReference + +Duration |
- TargetRef identifies an API object to apply the policy to. -Object must be in the same namespace as the policy. -Support: Gateway, HTTPRoute, GRPCRoute. +(Optional) +Timeout defines a timeout for reading client request body. The timeout is set only for a period between +two successive read operations, not for the transmission of the whole request body. +If a client does not transmit anything within this time, the request is terminated with the +408 (Request Time-out) error. +Default: https://nginx.org/en/docs/http/ngx_http_core_module.html#client_body_timeout. + |
+
+(Appears on: +ClientSettingsPolicySpec) +
++
ClientKeepAlive defines the keep-alive settings for clients.
+ +Field | +Description | +
---|---|
+requests + +int32 + + |
+
+(Optional)
+ Requests sets the maximum number of requests that can be served through one keep-alive connection. +After the maximum number of requests are made, the connection is closed. Closing connections periodically +is necessary to free per-connection memory allocations. Therefore, using too high maximum number of requests +is not recommended as it can lead to excessive memory usage. +Default: https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_requests. + |
+
+time + + +Duration + + + |
+
+(Optional)
+ Time defines the maximum time during which requests can be processed through one keep-alive connection. +After this time is reached, the connection is closed following the subsequent request processing. +Default: https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_time. + |
+
+timeout + + +ClientKeepAliveTimeout + + + |
+
+(Optional)
+ Timeout defines the keep-alive timeouts for clients. |
+(Appears on: +ClientKeepAlive) +
++
ClientKeepAliveTimeout defines the timeouts related to keep-alive client connections. +Default: Default: https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout.
+ +Field | +Description | +
---|---|
+server + + +Duration + + + |
+
+(Optional)
+ Server sets the timeout during which a keep-alive client connection will stay open on the server side. +Setting this value to 0 disables keep-alive client connections. |
-status + header - -sigs.k8s.io/gateway-api/apis/v1alpha2.PolicyStatus + +Duration |
- Status defines the state of the ClientSettingsPolicy. +(Optional) +Header sets the timeout in the “Keep-Alive: timeout=time” response header field. |
-(Appears on: ClientSettingsPolicy) +(Appears on: +ClientSettingsPolicy)
-
ClientSettingsPolicySpec defines the desired state of ClientSettingsPolicy.
-string
alias)string
alias)¶
+
-(Appears on: Logging) +(Appears on: +Logging)
-
ControllerLogLevel type defines the logging level for the control plane.
-string
alias)-(Appears on: ClientBody, ClientKeepAlive, ClientKeepAliveTimeout, TelemetryExporter) -
-Duration is a string value representing a duration in time. -Duration can be specified in milliseconds (ms) or seconds (s) A value without a suffix is seconds. -Examples: 120s, 50ms.
-string
alias)¶
-(Appears on: NginxGatewaySpec) -
-Logging defines logging related settings for the control plane.
-Field | -Description | -
---|---|
-level - - -ControllerLogLevel - - - |
-
-(Optional)
- Level defines the logging level. - |
-
+
Duration is a string value representing a duration in time. +Duration can be specified in milliseconds (ms) or seconds (s) A value without a suffix is seconds. +Examples: 120s, 50ms.
+ +NginxGateway represents the dynamic configuration for an NGINX Gateway Fabric control plane.
-+(Appears on: +NginxGatewaySpec) +
++
Logging defines logging related settings for the control plane.
+
-metadata - - -Kubernetes meta/v1.ObjectMeta - - - |
-
-Refer to the Kubernetes API documentation for the fields of the
-metadata field.
- |
-||
-spec - - -NginxGatewaySpec - - - |
-
- NginxGatewaySpec defines the desired state of the NginxGateway. -- -
|
-||
-status - - -NginxGatewayStatus - - - |
-
- NginxGatewayStatus defines the state of the NginxGateway. +Level defines the logging level. |
string
alias)string
alias)¶
+
+
NginxGatewayConditionReason defines the set of reasons that explain why a particular NginxGateway condition type has been raised.
-string
alias)string
alias)¶
+
+
NginxGatewayConditionType is a type of condition associated with an NginxGateway. This type should be used with the NginxGatewayStatus.Conditions field.
--(Appears on: NginxGateway) +(Appears on: +NginxGateway)
-
NginxGatewaySpec defines the desired state of the NginxGateway.
--(Appears on: NginxGateway) +(Appears on: +NginxGateway)
-
NginxGatewayStatus defines the state of the NginxGateway.
-NginxProxy is a configuration object that is attached to a GatewayClass parametersRef. It provides a way -to configure global settings for all Gateways defined from the GatewayClass.
-Field | -Description | -||||
---|---|---|---|---|---|
-metadata - - -Kubernetes meta/v1.ObjectMeta - - - |
-
-Refer to the Kubernetes API documentation for the fields of the
-metadata field.
- |
-||||
-spec - - -NginxProxySpec - - - |
-
- Spec defines the desired state of the NginxProxy. -- -
|
-
-(Appears on: NginxProxy) +(Appears on: +NginxProxy)
-
NginxProxySpec defines the desired state of the NginxProxy.
-ObservabilityPolicy is a Direct Attached Policy. It provides a way to configure observability settings for -the NGINX Gateway Fabric data plane. Used in conjunction with the NginxProxy CRD that is attached to the -GatewayClass parametersRef.
-Field | -Description | -||||
---|---|---|---|---|---|
-metadata - - -Kubernetes meta/v1.ObjectMeta - - - |
-
-Refer to the Kubernetes API documentation for the fields of the
-metadata field.
- |
-||||
-spec - - -ObservabilityPolicySpec - - - |
-
- Spec defines the desired state of the ObservabilityPolicy. -- -
|
-||||
-status - - -sigs.k8s.io/gateway-api/apis/v1alpha2.PolicyStatus - - - |
-
- Status defines the state of the ObservabilityPolicy. - |
-
-(Appears on: ObservabilityPolicy) +(Appears on: +ObservabilityPolicy)
-
ObservabilityPolicySpec defines the desired state of the ObservabilityPolicy.
-string
alias)string
alias)¶
+
-(Appears on: ClientBody) +(Appears on: +ClientBody)
-
Size is a string value representing a size. Size can be specified in bytes, kilobytes (k), megabytes (m), or gigabytes (g). Examples: 1024, 8k, 1m.
--(Appears on: Telemetry, Tracing) +(Appears on: +Telemetry, +Tracing)
-
SpanAttribute is a key value pair to be added to a tracing span.
--(Appears on: NginxProxySpec) +(Appears on: +NginxProxySpec)
-
Telemetry specifies the OpenTelemetry configuration.
--(Appears on: Telemetry) +(Appears on: +Telemetry)
-
TelemetryExporter specifies OpenTelemetry export parameters.
-string
alias)string
alias)¶
+
-(Appears on: Tracing) +(Appears on: +Tracing)
-
TraceContext specifies how to propagate traceparent/tracestate headers.
-string
alias)string
alias)¶
+
-(Appears on: Tracing) +(Appears on: +Tracing)
-
TraceStrategy defines the tracing strategy.
--(Appears on: ObservabilityPolicySpec) +(Appears on: +ObservabilityPolicySpec)
-
Tracing allows for enabling and configuring OpenTelemetry tracing.
-