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 ControllerStatus
- type Duration
- type Logging
- type NginxContext
- type NginxGateway
- type NginxGatewayConditionReason
- type NginxGatewayConditionType
- type NginxGatewayList
- type NginxGatewaySpec
- type NginxGatewayStatus
- 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 Snippet
- type SnippetsFilter
- type SnippetsFilterConditionReason
- type SnippetsFilterConditionType
- type SnippetsFilterList
- type SnippetsFilterSpec
- type SnippetsFilterStatus
- type SpanAttribute
- type TraceContext
- type TraceStrategy
- type Tracing
- type UpstreamKeepAlive
- type UpstreamSettingsPolicy
- func (in *UpstreamSettingsPolicy) DeepCopy() *UpstreamSettingsPolicy
- func (in *UpstreamSettingsPolicy) DeepCopyInto(out *UpstreamSettingsPolicy)
- func (in *UpstreamSettingsPolicy) DeepCopyObject() runtime.Object
- func (p *UpstreamSettingsPolicy) GetPolicyStatus() v1alpha2.PolicyStatus
- func (p *UpstreamSettingsPolicy) GetTargetRefs() []v1alpha2.LocalPolicyTargetReference
- func (p *UpstreamSettingsPolicy) SetPolicyStatus(status v1alpha2.PolicyStatus)
- type UpstreamSettingsPolicyList
- type UpstreamSettingsPolicySpec
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 ( // SnippetsFilterConditionTypeAccepted indicates that the SnippetsFilter is accepted. // // Possible reasons for this condition to be True: // // * Accepted // // Possible reasons for this condition to be False: // // * Invalid. SnippetsFilterConditionTypeAccepted SnippetsFilterConditionType = "Accepted" // SnippetsFilterConditionReasonAccepted is used with the Accepted condition type when // the condition is true. SnippetsFilterConditionReasonAccepted SnippetsFilterConditionReason = "Accepted" // SnippetsFilterConditionReasonInvalid is used with the Accepted condition type when // SnippetsFilter is invalid. SnippetsFilterConditionReasonInvalid SnippetsFilterConditionReason = "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 ¶
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 ¶
func (in *ClientBody) DeepCopy() *ClientBody
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientBody.
func (*ClientBody) DeepCopyInto ¶
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 ¶
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 ¶
func (in *ClientKeepAlive) DeepCopy() *ClientKeepAlive
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientKeepAlive.
func (*ClientKeepAlive) DeepCopyInto ¶
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 ¶
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 ¶
func (in *ClientKeepAliveTimeout) DeepCopy() *ClientKeepAliveTimeout
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientKeepAliveTimeout.
func (*ClientKeepAliveTimeout) DeepCopyInto ¶
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 ¶
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 ¶
func (in *ClientSettingsPolicy) DeepCopy() *ClientSettingsPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientSettingsPolicy.
func (*ClientSettingsPolicy) DeepCopyInto ¶
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 ¶
func (in *ClientSettingsPolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ClientSettingsPolicy) GetPolicyStatus ¶
func (p *ClientSettingsPolicy) GetPolicyStatus() v1alpha2.PolicyStatus
func (*ClientSettingsPolicy) GetTargetRefs ¶
func (p *ClientSettingsPolicy) GetTargetRefs() []v1alpha2.LocalPolicyTargetReference
func (*ClientSettingsPolicy) SetPolicyStatus ¶
func (p *ClientSettingsPolicy) SetPolicyStatus(status v1alpha2.PolicyStatus)
type ClientSettingsPolicyList ¶
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 ¶
func (in *ClientSettingsPolicyList) DeepCopy() *ClientSettingsPolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientSettingsPolicyList.
func (*ClientSettingsPolicyList) DeepCopyInto ¶
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 ¶
func (in *ClientSettingsPolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClientSettingsPolicySpec ¶
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 ¶
func (in *ClientSettingsPolicySpec) DeepCopy() *ClientSettingsPolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientSettingsPolicySpec.
func (*ClientSettingsPolicySpec) DeepCopyInto ¶
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 ControllerStatus ¶
type ControllerStatus struct { // ControllerName is a domain/path string that indicates the name of the // controller that wrote this status. This corresponds with the // controllerName field on GatewayClass. // // Example: "example.net/gateway-controller". // // The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are // valid Kubernetes names // (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names). // // Controllers MUST populate this field when writing status. Controllers should ensure that // entries to status populated with their ControllerName are cleaned up when they are no // longer necessary. ControllerName v1.GatewayController `json:"controllerName"` // Conditions describe the status of the SnippetsFilter. // // +optional // +listType=map // +listMapKey=type // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=8 Conditions []metav1.Condition `json:"conditions,omitempty"` }
func (*ControllerStatus) DeepCopy ¶
func (in *ControllerStatus) DeepCopy() *ControllerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerStatus.
func (*ControllerStatus) DeepCopyInto ¶
func (in *ControllerStatus) DeepCopyInto(out *ControllerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Duration ¶
type Duration string
Duration is a string value representing a duration in time. Duration can be specified in milliseconds (ms), seconds (s), minutes (m), hours (h). A value without a suffix is seconds. Examples: 120s, 50ms, 5m, 1h.
+kubebuilder:validation:Pattern=`^[0-9]{1,4}(ms|s|m|h)?$`
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 NginxContext ¶
type NginxContext string
NginxContext represents the NGINX configuration context.
+kubebuilder:validation:Enum=main;http;http.server;http.server.location
const ( // NginxContextMain is the main context of the NGINX configuration. NginxContextMain NginxContext = "main" // NginxContextHTTP is the http context of the NGINX configuration. // https://nginx.org/en/docs/http/ngx_http_core_module.html#http NginxContextHTTP NginxContext = "http" // NginxContextHTTPServer is the server context of the NGINX configuration. // https://nginx.org/en/docs/http/ngx_http_core_module.html#server NginxContextHTTPServer NginxContext = "http.server" // NginxContextHTTPServerLocation is the location context of the NGINX configuration. // https://nginx.org/en/docs/http/ngx_http_core_module.html#location NginxContextHTTPServerLocation NginxContext = "http.server.location" )
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 ObservabilityPolicy ¶
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 ¶
func (in *ObservabilityPolicy) DeepCopy() *ObservabilityPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObservabilityPolicy.
func (*ObservabilityPolicy) DeepCopyInto ¶
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 ¶
func (in *ObservabilityPolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ObservabilityPolicy) GetPolicyStatus ¶
func (p *ObservabilityPolicy) GetPolicyStatus() v1alpha2.PolicyStatus
func (*ObservabilityPolicy) GetTargetRefs ¶
func (p *ObservabilityPolicy) GetTargetRefs() []v1alpha2.LocalPolicyTargetReference
func (*ObservabilityPolicy) SetPolicyStatus ¶
func (p *ObservabilityPolicy) SetPolicyStatus(status v1alpha2.PolicyStatus)
type ObservabilityPolicyList ¶
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 ¶
func (in *ObservabilityPolicyList) DeepCopy() *ObservabilityPolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObservabilityPolicyList.
func (*ObservabilityPolicyList) DeepCopyInto ¶
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 ¶
func (in *ObservabilityPolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ObservabilityPolicySpec ¶
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:MinItems=1 // +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 ¶
func (in *ObservabilityPolicySpec) DeepCopy() *ObservabilityPolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObservabilityPolicySpec.
func (*ObservabilityPolicySpec) DeepCopyInto ¶
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 ¶
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 Snippet ¶
type Snippet struct { // Context is the NGINX context to insert the snippet into. Context NginxContext `json:"context"` // Value is the NGINX configuration snippet. // +kubebuilder:validation:MinLength=1 Value string `json:"value"` }
Snippet represents an NGINX configuration snippet.
func (*Snippet) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Snippet.
func (*Snippet) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SnippetsFilter ¶
type SnippetsFilter struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the desired state of the SnippetsFilter. Spec SnippetsFilterSpec `json:"spec"` // Status defines the state of the SnippetsFilter. Status SnippetsFilterStatus `json:"status,omitempty"` }
SnippetsFilter is a filter that allows inserting NGINX configuration into the generated NGINX config for HTTPRoute and GRPCRoute resources.
func (*SnippetsFilter) DeepCopy ¶
func (in *SnippetsFilter) DeepCopy() *SnippetsFilter
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnippetsFilter.
func (*SnippetsFilter) DeepCopyInto ¶
func (in *SnippetsFilter) DeepCopyInto(out *SnippetsFilter)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SnippetsFilter) DeepCopyObject ¶
func (in *SnippetsFilter) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SnippetsFilterConditionReason ¶
type SnippetsFilterConditionReason string
SnippetsFilterConditionReason is a reason for a SnippetsFilter condition type.
type SnippetsFilterConditionType ¶
type SnippetsFilterConditionType string
SnippetsFilterConditionType is a type of condition associated with SnippetsFilter.
type SnippetsFilterList ¶
type SnippetsFilterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []SnippetsFilter `json:"items"` }
SnippetsFilterList contains a list of SnippetFilters.
func (*SnippetsFilterList) DeepCopy ¶
func (in *SnippetsFilterList) DeepCopy() *SnippetsFilterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnippetsFilterList.
func (*SnippetsFilterList) DeepCopyInto ¶
func (in *SnippetsFilterList) DeepCopyInto(out *SnippetsFilterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SnippetsFilterList) DeepCopyObject ¶
func (in *SnippetsFilterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type SnippetsFilterSpec ¶
type SnippetsFilterSpec struct { // Snippets is a list of NGINX configuration snippets. // There can only be one snippet per context. // Allowed contexts: main, http, http.server, http.server.location. // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=4 // +kubebuilder:validation:XValidation:message="Only one snippet allowed per context",rule="self.all(s1, self.exists_one(s2, s1.context == s2.context))" //nolint:lll Snippets []Snippet `json:"snippets"` }
SnippetsFilterSpec defines the desired state of the SnippetsFilter.
func (*SnippetsFilterSpec) DeepCopy ¶
func (in *SnippetsFilterSpec) DeepCopy() *SnippetsFilterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnippetsFilterSpec.
func (*SnippetsFilterSpec) DeepCopyInto ¶
func (in *SnippetsFilterSpec) DeepCopyInto(out *SnippetsFilterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SnippetsFilterStatus ¶
type SnippetsFilterStatus struct { // Controllers is a list of Gateway API controllers that processed the SnippetsFilter // and the status of the SnippetsFilter with respect to each controller. // // +kubebuilder:validation:MaxItems=16 Controllers []ControllerStatus `json:"controllers,omitempty"` }
SnippetsFilterStatus defines the state of SnippetsFilter.
func (*SnippetsFilterStatus) DeepCopy ¶
func (in *SnippetsFilterStatus) DeepCopy() *SnippetsFilterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnippetsFilterStatus.
func (*SnippetsFilterStatus) DeepCopyInto ¶
func (in *SnippetsFilterStatus) DeepCopyInto(out *SnippetsFilterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SpanAttribute ¶
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 ¶
func (in *SpanAttribute) DeepCopy() *SpanAttribute
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpanAttribute.
func (*SpanAttribute) DeepCopyInto ¶
func (in *SpanAttribute) DeepCopyInto(out *SpanAttribute)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TraceContext ¶
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 ¶
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 ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tracing.
func (*Tracing) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UpstreamKeepAlive ¶
type UpstreamKeepAlive struct { // Connections sets the maximum number of idle keep-alive connections to upstream servers that are preserved // in the cache of each nginx worker process. When this number is exceeded, the least recently used // connections are closed. // Directive: https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive // // +optional // +kubebuilder:validation:Minimum=1 Connections *int32 `json:"connections,omitempty"` // 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. // Directive: https://nginx.org/en/docs/http/ngx_http_upstream_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. // Directive: https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_time // // +optional Time *Duration `json:"time,omitempty"` // Timeout defines the keep-alive timeout for upstreams. // Directive: https://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive_timeout // // +optional Timeout *Duration `json:"timeout,omitempty"` }
UpstreamKeepAlive defines the keep-alive settings for upstreams.
func (*UpstreamKeepAlive) DeepCopy ¶
func (in *UpstreamKeepAlive) DeepCopy() *UpstreamKeepAlive
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamKeepAlive.
func (*UpstreamKeepAlive) DeepCopyInto ¶
func (in *UpstreamKeepAlive) DeepCopyInto(out *UpstreamKeepAlive)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UpstreamSettingsPolicy ¶
type UpstreamSettingsPolicy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Spec defines the desired state of the UpstreamSettingsPolicy. Spec UpstreamSettingsPolicySpec `json:"spec"` // Status defines the state of the UpstreamSettingsPolicy. Status gatewayv1alpha2.PolicyStatus `json:"status,omitempty"` }
UpstreamSettingsPolicy is a Direct Attached Policy. It provides a way to configure the behavior of the connection between NGINX and the upstream applications.
func (*UpstreamSettingsPolicy) DeepCopy ¶
func (in *UpstreamSettingsPolicy) DeepCopy() *UpstreamSettingsPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamSettingsPolicy.
func (*UpstreamSettingsPolicy) DeepCopyInto ¶
func (in *UpstreamSettingsPolicy) DeepCopyInto(out *UpstreamSettingsPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*UpstreamSettingsPolicy) DeepCopyObject ¶
func (in *UpstreamSettingsPolicy) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*UpstreamSettingsPolicy) GetPolicyStatus ¶
func (p *UpstreamSettingsPolicy) GetPolicyStatus() v1alpha2.PolicyStatus
func (*UpstreamSettingsPolicy) GetTargetRefs ¶
func (p *UpstreamSettingsPolicy) GetTargetRefs() []v1alpha2.LocalPolicyTargetReference
func (*UpstreamSettingsPolicy) SetPolicyStatus ¶
func (p *UpstreamSettingsPolicy) SetPolicyStatus(status v1alpha2.PolicyStatus)
type UpstreamSettingsPolicyList ¶
type UpstreamSettingsPolicyList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []UpstreamSettingsPolicy `json:"items"` }
UpstreamSettingsPolicyList contains a list of UpstreamSettingsPolicies.
func (*UpstreamSettingsPolicyList) DeepCopy ¶
func (in *UpstreamSettingsPolicyList) DeepCopy() *UpstreamSettingsPolicyList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamSettingsPolicyList.
func (*UpstreamSettingsPolicyList) DeepCopyInto ¶
func (in *UpstreamSettingsPolicyList) DeepCopyInto(out *UpstreamSettingsPolicyList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*UpstreamSettingsPolicyList) DeepCopyObject ¶
func (in *UpstreamSettingsPolicyList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type UpstreamSettingsPolicySpec ¶
type UpstreamSettingsPolicySpec struct { // ZoneSize is the size of the shared memory zone used by the upstream. This memory zone is used to share // the upstream configuration between nginx worker processes. The more servers that an upstream has, // the larger memory zone is required. // Default: OSS: 512k, Plus: 1m. // Directive: https://nginx.org/en/docs/http/ngx_http_upstream_module.html#zone // // +optional ZoneSize *Size `json:"zoneSize,omitempty"` // KeepAlive defines the keep-alive settings. // // +optional KeepAlive *UpstreamKeepAlive `json:"keepAlive,omitempty"` // TargetRefs identifies API object(s) to apply the policy to. // Objects must be in the same namespace as the policy. // Support: Service // // TargetRefs must be _distinct_. The `name` field must be unique for all targetRef entries in the UpstreamSettingsPolicy. // // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:MaxItems=16 // +kubebuilder:validation:XValidation:message="TargetRefs Kind must be: Service",rule="self.all(t, t.kind=='Service')" // +kubebuilder:validation:XValidation:message="TargetRefs Group must be core",rule="self.exists(t, t.group==”) || self.exists(t, t.group=='core')" // +kubebuilder:validation:XValidation:message="TargetRef Name must be unique",rule="self.all(p1, self.exists_one(p2, p1.name == p2.name))" //nolint:lll TargetRefs []gatewayv1alpha2.LocalPolicyTargetReference `json:"targetRefs"` }
UpstreamSettingsPolicySpec defines the desired state of the UpstreamSettingsPolicy.
func (*UpstreamSettingsPolicySpec) DeepCopy ¶
func (in *UpstreamSettingsPolicySpec) DeepCopy() *UpstreamSettingsPolicySpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamSettingsPolicySpec.
func (*UpstreamSettingsPolicySpec) DeepCopyInto ¶
func (in *UpstreamSettingsPolicySpec) DeepCopyInto(out *UpstreamSettingsPolicySpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.