Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the gateway.nginx.org API group.
+kubebuilder:object:generate=true +groupName=gateway.nginx.org
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type ClientBody
- type ClientKeepAlive
- type ClientKeepAliveTimeout
- type ClientSettingsPolicy
- func (in *ClientSettingsPolicy) DeepCopy() *ClientSettingsPolicy
- func (in *ClientSettingsPolicy) DeepCopyInto(out *ClientSettingsPolicy)
- func (in *ClientSettingsPolicy) DeepCopyObject() runtime.Object
- func (p *ClientSettingsPolicy) GetPolicyStatus() v1alpha2.PolicyStatus
- func (p *ClientSettingsPolicy) GetTargetRefs() []v1alpha2.LocalPolicyTargetReference
- func (p *ClientSettingsPolicy) SetPolicyStatus(status v1alpha2.PolicyStatus)
- type ClientSettingsPolicyList
- type ClientSettingsPolicySpec
- type ControllerLogLevel
- type Duration
- type IPFamilyType
- type Logging
- type NginxGateway
- type NginxGatewayConditionReason
- type NginxGatewayConditionType
- type NginxGatewayList
- type NginxGatewaySpec
- type NginxGatewayStatus
- type NginxProxy
- type NginxProxyList
- type NginxProxySpec
- type ObservabilityPolicy
- func (in *ObservabilityPolicy) DeepCopy() *ObservabilityPolicy
- func (in *ObservabilityPolicy) DeepCopyInto(out *ObservabilityPolicy)
- func (in *ObservabilityPolicy) DeepCopyObject() runtime.Object
- func (p *ObservabilityPolicy) GetPolicyStatus() v1alpha2.PolicyStatus
- func (p *ObservabilityPolicy) GetTargetRefs() []v1alpha2.LocalPolicyTargetReference
- func (p *ObservabilityPolicy) SetPolicyStatus(status v1alpha2.PolicyStatus)
- type ObservabilityPolicyList
- type ObservabilityPolicySpec
- type Size
- type SpanAttribute
- type Telemetry
- type TelemetryExporter
- type TraceContext
- type TraceStrategy
- type Tracing
Constants ¶
const ( // NginxGatewayConditionValid is a condition that is true when the NginxGateway // configuration is syntactically and semantically valid. NginxGatewayConditionValid NginxGatewayConditionType = "Valid" // NginxGatewayReasonValid is a reason that is used with the "Valid" condition when the condition is True. NginxGatewayReasonValid NginxGatewayConditionReason = "Valid" // NginxGatewayReasonInvalid is a reason that is used with the "Valid" condition when the condition is False. NginxGatewayReasonInvalid NginxGatewayConditionReason = "Invalid" )
const GroupName = "gateway.nginx.org"
GroupName specifies the group name used to register the objects.
Variables ¶
var ( // SchemeBuilder collects functions that add things to a scheme. It's to allow // code to compile without explicitly referencing generated types. You should // declare one in each package that will have generated deep copy or conversion // functions. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme applies all the stored functions to the scheme. A non-nil error // indicates that one function failed and the attempt was abandoned. AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects.
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource.
Types ¶
type ClientBody ¶ added in v1.3.0
type ClientBody struct { // 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. // // +optional MaxSize *Size `json:"maxSize,omitempty"` // 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. // // +optional Timeout *Duration `json:"timeout,omitempty"` }
ClientBody contains the settings for the client request body.
func (*ClientBody) DeepCopy ¶ added in v1.3.0
func (in *ClientBody) DeepCopy() *ClientBody
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientBody.
func (*ClientBody) DeepCopyInto ¶ added in v1.3.0
func (in *ClientBody) DeepCopyInto(out *ClientBody)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClientKeepAlive ¶ added in v1.3.0
type ClientKeepAlive struct { // 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. // // +optional // +kubebuilder:validation:Minimum=0 Requests *int32 `json:"requests,omitempty"` // 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. // // +optional Time *Duration `json:"time,omitempty"` // Timeout defines the keep-alive timeouts for clients. // // +kubebuilder:validation:XValidation:message="header can only be specified if server is specified",rule="!(has(self.header) && !has(self.server))" // // // +optional //nolint:lll Timeout *ClientKeepAliveTimeout `json:"timeout,omitempty"` }
ClientKeepAlive defines the keep-alive settings for clients.
func (*ClientKeepAlive) DeepCopy ¶ added in v1.3.0
func (in *ClientKeepAlive) DeepCopy() *ClientKeepAlive
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientKeepAlive.
func (*ClientKeepAlive) DeepCopyInto ¶ added in v1.3.0
func (in *ClientKeepAlive) DeepCopyInto(out *ClientKeepAlive)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClientKeepAliveTimeout ¶ added in v1.3.0
type ClientKeepAliveTimeout struct { // 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. // // +optional Server *Duration `json:"server,omitempty"` // Header sets the timeout in the "Keep-Alive: timeout=time" response header field. // // +optional Header *Duration `json:"header,omitempty"` }
ClientKeepAliveTimeout defines the timeouts related to keep-alive client connections. Default: https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout.
func (*ClientKeepAliveTimeout) DeepCopy ¶ added in v1.3.0
func (in *ClientKeepAliveTimeout) DeepCopy() *ClientKeepAliveTimeout
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientKeepAliveTimeout.
func (*ClientKeepAliveTimeout) DeepCopyInto ¶ added in v1.3.0
func (in *ClientKeepAliveTimeout) DeepCopyInto(out *ClientKeepAliveTimeout)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClientSettingsPolicy ¶ added in v1.3.0
type ClientSettingsPolicy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the desired state of the ClientSettingsPolicy. Spec ClientSettingsPolicySpec `json:"spec"` // Status defines the state of the ClientSettingsPolicy. Status gatewayv1alpha2.PolicyStatus `json:"status,omitempty"` }
ClientSettingsPolicy is an Inherited Attached Policy. It provides a way to configure the behavior of the connection between the client and NGINX Gateway Fabric.
func (*ClientSettingsPolicy) DeepCopy ¶ added in v1.3.0
func (in *ClientSettingsPolicy) DeepCopy() *ClientSettingsPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientSettingsPolicy.
func (*ClientSettingsPolicy) DeepCopyInto ¶ added in v1.3.0
func (in *ClientSettingsPolicy) DeepCopyInto(out *ClientSettingsPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClientSettingsPolicy) DeepCopyObject ¶ added in v1.3.0
func (in *ClientSettingsPolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ClientSettingsPolicy) GetPolicyStatus ¶ added in v1.3.0
func (p *ClientSettingsPolicy) GetPolicyStatus() v1alpha2.PolicyStatus
func (*ClientSettingsPolicy) GetTargetRefs ¶ added in v1.3.0
func (p *ClientSettingsPolicy) GetTargetRefs() []v1alpha2.LocalPolicyTargetReference
func (*ClientSettingsPolicy) SetPolicyStatus ¶ added in v1.3.0
func (p *ClientSettingsPolicy) SetPolicyStatus(status v1alpha2.PolicyStatus)
type ClientSettingsPolicyList ¶ added in v1.3.0
type ClientSettingsPolicyList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClientSettingsPolicy `json:"items"` }
ClientSettingsPolicyList contains a list of ClientSettingsPolicies.
func (*ClientSettingsPolicyList) DeepCopy ¶ added in v1.3.0
func (in *ClientSettingsPolicyList) DeepCopy() *ClientSettingsPolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientSettingsPolicyList.
func (*ClientSettingsPolicyList) DeepCopyInto ¶ added in v1.3.0
func (in *ClientSettingsPolicyList) DeepCopyInto(out *ClientSettingsPolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClientSettingsPolicyList) DeepCopyObject ¶ added in v1.3.0
func (in *ClientSettingsPolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClientSettingsPolicySpec ¶ added in v1.3.0
type ClientSettingsPolicySpec struct { // Body defines the client request body settings. // // +optional Body *ClientBody `json:"body,omitempty"` // KeepAlive defines the keep-alive settings. // // +optional KeepAlive *ClientKeepAlive `json:"keepAlive,omitempty"` // TargetRef identifies an API object to apply the policy to. // Object must be in the same namespace as the policy. // Support: Gateway, HTTPRoute, GRPCRoute. // // +kubebuilder:validation:XValidation:message="TargetRef Kind must be one of: Gateway, HTTPRoute, or GRPCRoute",rule="(self.kind=='Gateway' || self.kind=='HTTPRoute' || self.kind=='GRPCRoute')" // +kubebuilder:validation:XValidation:message="TargetRef Group must be gateway.networking.k8s.io.",rule="(self.group=='gateway.networking.k8s.io')" //nolint:lll TargetRef gatewayv1alpha2.LocalPolicyTargetReference `json:"targetRef"` }
ClientSettingsPolicySpec defines the desired state of ClientSettingsPolicy.
func (*ClientSettingsPolicySpec) DeepCopy ¶ added in v1.3.0
func (in *ClientSettingsPolicySpec) DeepCopy() *ClientSettingsPolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientSettingsPolicySpec.
func (*ClientSettingsPolicySpec) DeepCopyInto ¶ added in v1.3.0
func (in *ClientSettingsPolicySpec) DeepCopyInto(out *ClientSettingsPolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ControllerLogLevel ¶
type ControllerLogLevel string
ControllerLogLevel type defines the logging level for the control plane.
+kubebuilder:validation:Enum=info;debug;error
const ( // ControllerLogLevelInfo is the info level for control plane logging. ControllerLogLevelInfo ControllerLogLevel = "info" // ControllerLogLevelDebug is the debug level for control plane logging. ControllerLogLevelDebug ControllerLogLevel = "debug" // ControllerLogLevelError is the error level for control plane logging. ControllerLogLevelError ControllerLogLevel = "error" )
type Duration ¶ added in v1.3.0
type Duration string
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.
+kubebuilder:validation:Pattern=`^\d{1,4}(ms|s)?$`
type IPFamilyType ¶ added in v1.4.0
type IPFamilyType string
IPFamilyType specifies the IP family to be used by NGINX.
+kubebuilder:validation:Enum=dual;ipv4;ipv6
const ( // Dual specifies that NGINX will use both IPv4 and IPv6. Dual IPFamilyType = "dual" // IPv4 specifies that NGINX will use only IPv4. IPv4 IPFamilyType = "ipv4" // IPv6 specifies that NGINX will use only IPv6. IPv6 IPFamilyType = "ipv6" )
type Logging ¶
type Logging struct { // Level defines the logging level. // // +optional // +kubebuilder:default=info Level *ControllerLogLevel `json:"level,omitempty"` }
Logging defines logging related settings for the control plane.
func (*Logging) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Logging.
func (*Logging) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NginxGateway ¶
type NginxGateway struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // NginxGatewaySpec defines the desired state of the NginxGateway. Spec NginxGatewaySpec `json:"spec"` // NginxGatewayStatus defines the state of the NginxGateway. Status NginxGatewayStatus `json:"status,omitempty"` }
NginxGateway represents the dynamic configuration for an NGINX Gateway Fabric control plane.
func (*NginxGateway) DeepCopy ¶
func (in *NginxGateway) DeepCopy() *NginxGateway
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NginxGateway.
func (*NginxGateway) DeepCopyInto ¶
func (in *NginxGateway) DeepCopyInto(out *NginxGateway)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NginxGateway) DeepCopyObject ¶
func (in *NginxGateway) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NginxGatewayConditionReason ¶
type NginxGatewayConditionReason string
NginxGatewayConditionReason defines the set of reasons that explain why a particular NginxGateway condition type has been raised.
type NginxGatewayConditionType ¶
type NginxGatewayConditionType string
NginxGatewayConditionType is a type of condition associated with an NginxGateway. This type should be used with the NginxGatewayStatus.Conditions field.
type NginxGatewayList ¶
type NginxGatewayList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []NginxGateway `json:"items"` }
NginxGatewayList contains a list of NginxGateways.
func (*NginxGatewayList) DeepCopy ¶
func (in *NginxGatewayList) DeepCopy() *NginxGatewayList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NginxGatewayList.
func (*NginxGatewayList) DeepCopyInto ¶
func (in *NginxGatewayList) DeepCopyInto(out *NginxGatewayList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NginxGatewayList) DeepCopyObject ¶
func (in *NginxGatewayList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NginxGatewaySpec ¶
type NginxGatewaySpec struct { // Logging defines logging related settings for the control plane. // // +optional Logging *Logging `json:"logging,omitempty"` }
NginxGatewaySpec defines the desired state of the NginxGateway.
func (*NginxGatewaySpec) DeepCopy ¶
func (in *NginxGatewaySpec) DeepCopy() *NginxGatewaySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NginxGatewaySpec.
func (*NginxGatewaySpec) DeepCopyInto ¶
func (in *NginxGatewaySpec) DeepCopyInto(out *NginxGatewaySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NginxGatewayStatus ¶
type NginxGatewayStatus struct { // +optional // +listType=map // +listMapKey=type // +kubebuilder:validation:MaxItems=8 Conditions []metav1.Condition `json:"conditions,omitempty"` }
NginxGatewayStatus defines the state of the NginxGateway.
func (*NginxGatewayStatus) DeepCopy ¶
func (in *NginxGatewayStatus) DeepCopy() *NginxGatewayStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NginxGatewayStatus.
func (*NginxGatewayStatus) DeepCopyInto ¶
func (in *NginxGatewayStatus) DeepCopyInto(out *NginxGatewayStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NginxProxy ¶ added in v1.3.0
type NginxProxy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the desired state of the NginxProxy. Spec NginxProxySpec `json:"spec"` }
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.
func (*NginxProxy) DeepCopy ¶ added in v1.3.0
func (in *NginxProxy) DeepCopy() *NginxProxy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NginxProxy.
func (*NginxProxy) DeepCopyInto ¶ added in v1.3.0
func (in *NginxProxy) DeepCopyInto(out *NginxProxy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NginxProxy) DeepCopyObject ¶ added in v1.3.0
func (in *NginxProxy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NginxProxyList ¶ added in v1.3.0
type NginxProxyList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []NginxProxy `json:"items"` }
NginxProxyList contains a list of NginxProxies.
func (*NginxProxyList) DeepCopy ¶ added in v1.3.0
func (in *NginxProxyList) DeepCopy() *NginxProxyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NginxProxyList.
func (*NginxProxyList) DeepCopyInto ¶ added in v1.3.0
func (in *NginxProxyList) DeepCopyInto(out *NginxProxyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NginxProxyList) DeepCopyObject ¶ added in v1.3.0
func (in *NginxProxyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NginxProxySpec ¶ added in v1.3.0
type NginxProxySpec struct { // IPFamily specifies the IP family to be used by the NGINX. // Default is "dual", meaning the server will use both IPv4 and IPv6. // // +optional // +kubebuilder:default:=dual IPFamily *IPFamilyType `json:"ipFamily,omitempty"` // Telemetry specifies the OpenTelemetry configuration. // // +optional Telemetry *Telemetry `json:"telemetry,omitempty"` // DisableHTTP2 defines if http2 should be disabled for all servers. // Default is false, meaning http2 will be enabled for all servers. // // +optional DisableHTTP2 bool `json:"disableHTTP2,omitempty"` }
NginxProxySpec defines the desired state of the NginxProxy.
func (*NginxProxySpec) DeepCopy ¶ added in v1.3.0
func (in *NginxProxySpec) DeepCopy() *NginxProxySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NginxProxySpec.
func (*NginxProxySpec) DeepCopyInto ¶ added in v1.3.0
func (in *NginxProxySpec) DeepCopyInto(out *NginxProxySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ObservabilityPolicy ¶ added in v1.3.0
type ObservabilityPolicy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the desired state of the ObservabilityPolicy. Spec ObservabilityPolicySpec `json:"spec"` // Status defines the state of the ObservabilityPolicy. Status gatewayv1alpha2.PolicyStatus `json:"status,omitempty"` }
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.
func (*ObservabilityPolicy) DeepCopy ¶ added in v1.3.0
func (in *ObservabilityPolicy) DeepCopy() *ObservabilityPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObservabilityPolicy.
func (*ObservabilityPolicy) DeepCopyInto ¶ added in v1.3.0
func (in *ObservabilityPolicy) DeepCopyInto(out *ObservabilityPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ObservabilityPolicy) DeepCopyObject ¶ added in v1.3.0
func (in *ObservabilityPolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ObservabilityPolicy) GetPolicyStatus ¶ added in v1.3.0
func (p *ObservabilityPolicy) GetPolicyStatus() v1alpha2.PolicyStatus
func (*ObservabilityPolicy) GetTargetRefs ¶ added in v1.3.0
func (p *ObservabilityPolicy) GetTargetRefs() []v1alpha2.LocalPolicyTargetReference
func (*ObservabilityPolicy) SetPolicyStatus ¶ added in v1.3.0
func (p *ObservabilityPolicy) SetPolicyStatus(status v1alpha2.PolicyStatus)
type ObservabilityPolicyList ¶ added in v1.3.0
type ObservabilityPolicyList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ObservabilityPolicy `json:"items"` }
ObservabilityPolicyList contains a list of ObservabilityPolicies.
func (*ObservabilityPolicyList) DeepCopy ¶ added in v1.3.0
func (in *ObservabilityPolicyList) DeepCopy() *ObservabilityPolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObservabilityPolicyList.
func (*ObservabilityPolicyList) DeepCopyInto ¶ added in v1.3.0
func (in *ObservabilityPolicyList) DeepCopyInto(out *ObservabilityPolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ObservabilityPolicyList) DeepCopyObject ¶ added in v1.3.0
func (in *ObservabilityPolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ObservabilityPolicySpec ¶ added in v1.3.0
type ObservabilityPolicySpec struct { // Tracing allows for enabling and configuring tracing. // // +optional Tracing *Tracing `json:"tracing,omitempty"` // TargetRefs identifies the API object(s) to apply the policy to. // Objects must be in the same namespace as the policy. // Support: HTTPRoute, GRPCRoute. // // +kubebuilder:validation:MaxItems=16 // +kubebuilder:validation:XValidation:message="TargetRef Kind must be: HTTPRoute or GRPCRoute",rule="(self.exists(t, t.kind=='HTTPRoute') || self.exists(t, t.kind=='GRPCRoute'))" // +kubebuilder:validation:XValidation:message="TargetRef Group must be gateway.networking.k8s.io.",rule="self.all(t, t.group=='gateway.networking.k8s.io')" //nolint:lll TargetRefs []gatewayv1alpha2.LocalPolicyTargetReference `json:"targetRefs"` }
ObservabilityPolicySpec defines the desired state of the ObservabilityPolicy.
func (*ObservabilityPolicySpec) DeepCopy ¶ added in v1.3.0
func (in *ObservabilityPolicySpec) DeepCopy() *ObservabilityPolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObservabilityPolicySpec.
func (*ObservabilityPolicySpec) DeepCopyInto ¶ added in v1.3.0
func (in *ObservabilityPolicySpec) DeepCopyInto(out *ObservabilityPolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Size ¶ added in v1.3.0
type Size string
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.
+kubebuilder:validation:Pattern=`^\d{1,4}(k|m|g)?$`
type SpanAttribute ¶ added in v1.3.0
type SpanAttribute struct { // Key is the key for a span attribute. // Format: must have all '"' escaped and must not contain any '$' or end with an unescaped '\' // // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=255 // +kubebuilder:validation:Pattern=`^([^"$\\]|\\[^$])*$` Key string `json:"key"` // Value is the value for a span attribute. // Format: must have all '"' escaped and must not contain any '$' or end with an unescaped '\' // // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=255 // +kubebuilder:validation:Pattern=`^([^"$\\]|\\[^$])*$` Value string `json:"value"` }
SpanAttribute is a key value pair to be added to a tracing span.
func (*SpanAttribute) DeepCopy ¶ added in v1.3.0
func (in *SpanAttribute) DeepCopy() *SpanAttribute
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpanAttribute.
func (*SpanAttribute) DeepCopyInto ¶ added in v1.3.0
func (in *SpanAttribute) DeepCopyInto(out *SpanAttribute)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Telemetry ¶ added in v1.3.0
type Telemetry struct { // Exporter specifies OpenTelemetry export parameters. // // +optional Exporter *TelemetryExporter `json:"exporter,omitempty"` // ServiceName is the "service.name" attribute of the OpenTelemetry resource. // Default is 'ngf:<gateway-namespace>:<gateway-name>'. If a value is provided by the user, // then the default becomes a prefix to that value. // // +optional // +kubebuilder:validation:MaxLength=127 // +kubebuilder:validation:Pattern=`^[a-zA-Z0-9_-]+$` ServiceName *string `json:"serviceName,omitempty"` // SpanAttributes are custom key/value attributes that are added to each span. // // +optional // +listType=map // +listMapKey=key // +kubebuilder:validation:MaxItems=64 SpanAttributes []SpanAttribute `json:"spanAttributes,omitempty"` }
Telemetry specifies the OpenTelemetry configuration.
func (*Telemetry) DeepCopy ¶ added in v1.3.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Telemetry.
func (*Telemetry) DeepCopyInto ¶ added in v1.3.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TelemetryExporter ¶ added in v1.3.0
type TelemetryExporter struct { // Interval is the maximum interval between two exports. // Default: https://nginx.org/en/docs/ngx_otel_module.html#otel_exporter // // +optional Interval *Duration `json:"interval,omitempty"` // BatchSize is the maximum number of spans to be sent in one batch per worker. // Default: https://nginx.org/en/docs/ngx_otel_module.html#otel_exporter // // +optional // +kubebuilder:validation:Minimum=0 BatchSize *int32 `json:"batchSize,omitempty"` // BatchCount is the number of pending batches per worker, spans exceeding the limit are dropped. // Default: https://nginx.org/en/docs/ngx_otel_module.html#otel_exporter // // +optional // +kubebuilder:validation:Minimum=0 BatchCount *int32 `json:"batchCount,omitempty"` // Endpoint is the address of OTLP/gRPC endpoint that will accept telemetry data. // Format: alphanumeric hostname with optional http scheme and optional port. // //nolint:lll // +kubebuilder:validation:Pattern=`^(?:http?:\/\/)?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*(?::\d{1,5})?$` Endpoint string `json:"endpoint"` }
TelemetryExporter specifies OpenTelemetry export parameters.
func (*TelemetryExporter) DeepCopy ¶ added in v1.3.0
func (in *TelemetryExporter) DeepCopy() *TelemetryExporter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TelemetryExporter.
func (*TelemetryExporter) DeepCopyInto ¶ added in v1.3.0
func (in *TelemetryExporter) DeepCopyInto(out *TelemetryExporter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TraceContext ¶ added in v1.3.0
type TraceContext string
TraceContext specifies how to propagate traceparent/tracestate headers.
+kubebuilder:validation:Enum=extract;inject;propagate;ignore
const ( // TraceContextExtract uses an existing trace context from the request, so that the identifiers // of a trace and the parent span are inherited from the incoming request. TraceContextExtract TraceContext = "extract" // TraceContextInject adds a new context to the request, overwriting existing headers, if any. TraceContextInject TraceContext = "inject" // TraceContextPropagate updates the existing context (combines extract and inject). TraceContextPropagate TraceContext = "propagate" // TraceContextIgnore skips context headers processing. TraceContextIgnore TraceContext = "ignore" )
type TraceStrategy ¶ added in v1.3.0
type TraceStrategy string
TraceStrategy defines the tracing strategy.
+kubebuilder:validation:Enum=ratio;parent
const ( // TraceStrategyRatio enables ratio-based tracing, defaulting to 100% sampling rate. TraceStrategyRatio TraceStrategy = "ratio" // TraceStrategyParent enables tracing and only records spans if the parent span was sampled. TraceStrategyParent TraceStrategy = "parent" )
type Tracing ¶ added in v1.3.0
type Tracing struct { // Strategy defines if tracing is ratio-based or parent-based. Strategy TraceStrategy `json:"strategy"` // Ratio is the percentage of traffic that should be sampled. Integer from 0 to 100. // By default, 100% of http requests are traced. Not applicable for parent-based tracing. // If ratio is set to 0, tracing is disabled. // // +optional // +kubebuilder:validation:Minimum=0 // +kubebuilder:validation:Maximum=100 Ratio *int32 `json:"ratio,omitempty"` // Context specifies how to propagate traceparent/tracestate headers. // Default: https://nginx.org/en/docs/ngx_otel_module.html#otel_trace_context // // +optional Context *TraceContext `json:"context,omitempty"` // SpanName defines the name of the Otel span. By default is the name of the location for a request. // If specified, applies to all locations that are created for a route. // Format: must have all '"' escaped and must not contain any '$' or end with an unescaped '\' // Examples of invalid names: some-$value, quoted-"value"-name, unescaped\ // // +optional // +kubebuilder:validation:MinLength=1 // +kubebuilder:validation:MaxLength=255 // +kubebuilder:validation:Pattern=`^([^"$\\]|\\[^$])*$` SpanName *string `json:"spanName,omitempty"` // SpanAttributes are custom key/value attributes that are added to each span. // // +optional // +listType=map // +listMapKey=key // +kubebuilder:validation:MaxItems=64 SpanAttributes []SpanAttribute `json:"spanAttributes,omitempty"` }
Tracing allows for enabling and configuring OpenTelemetry tracing.
+kubebuilder:validation:XValidation:message="ratio can only be specified if strategy is of type ratio",rule="!(has(self.ratio) && self.strategy != 'ratio')"
func (*Tracing) DeepCopy ¶ added in v1.3.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tracing.
func (*Tracing) DeepCopyInto ¶ added in v1.3.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.