v1alpha2

package
v1.4.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1alpha2 is the v1alpha1 version of the API.

Index

Constants

View Source
const GroupName = "gateway.flomesh.io"

GroupName specifies the group name used to register the objects.

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Deprecated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha2"}

GroupVersion specifies the group and the version used to register the objects.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type BackendLBPolicy added in v1.4.2

type BackendLBPolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the desired state of BackendLBPolicy.
	Spec BackendLBPolicySpec `json:"spec"`

	// Status defines the current state of BackendLBPolicy.
	Status gwv1alpha2.PolicyStatus `json:"status,omitempty"`
}

BackendLBPolicy provides a way to define load balancing rules for a backend.

func (*BackendLBPolicy) DeepCopy added in v1.4.2

func (in *BackendLBPolicy) DeepCopy() *BackendLBPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackendLBPolicy.

func (*BackendLBPolicy) DeepCopyInto added in v1.4.2

func (in *BackendLBPolicy) DeepCopyInto(out *BackendLBPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BackendLBPolicy) DeepCopyObject added in v1.4.2

func (in *BackendLBPolicy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type BackendLBPolicyList added in v1.4.2

type BackendLBPolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []BackendLBPolicy `json:"items"`
}

BackendLBPolicyList contains a list of BackendLBPolicies

func (*BackendLBPolicyList) DeepCopy added in v1.4.2

func (in *BackendLBPolicyList) DeepCopy() *BackendLBPolicyList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackendLBPolicyList.

func (*BackendLBPolicyList) DeepCopyInto added in v1.4.2

func (in *BackendLBPolicyList) DeepCopyInto(out *BackendLBPolicyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*BackendLBPolicyList) DeepCopyObject added in v1.4.2

func (in *BackendLBPolicyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type BackendLBPolicySpec added in v1.4.2

type BackendLBPolicySpec struct {
	// TargetRef identifies an API object to apply policy to.
	// Currently, Backends (i.e. Service, ServiceImport, or any
	// implementation-specific backendRef) are the only valid API
	// target references.
	// +listType=map
	// +listMapKey=group
	// +listMapKey=kind
	// +listMapKey=name
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=16
	TargetRefs []gwv1alpha2.LocalPolicyTargetReference `json:"targetRefs"`

	// SessionPersistence defines and configures session persistence
	// for the backend.
	//
	// Support: Extended
	//
	// +optional
	SessionPersistence *gwv1alpha2.SessionPersistence `json:"sessionPersistence,omitempty"`

	// +optional
	// +kubebuilder:validation:Enum=RoundRobin;LeastLoad
	// Algorithm is the load balancing algorithm, default is RoundRobin
	Algorithm *LoadBalancerAlgorithm `json:"algorithm,omitempty"`
}

BackendLBPolicySpec defines the desired state of BackendLBPolicy. Note: there is no Override or Default policy configuration.

func (*BackendLBPolicySpec) DeepCopy added in v1.4.2

func (in *BackendLBPolicySpec) DeepCopy() *BackendLBPolicySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackendLBPolicySpec.

func (*BackendLBPolicySpec) DeepCopyInto added in v1.4.2

func (in *BackendLBPolicySpec) DeepCopyInto(out *BackendLBPolicySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HealthCheckConfig

type HealthCheckConfig struct {
	// +kubebuilder:default="1s"
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Pattern=`^([0-9]{1,5}(h|m|s|ms)){1,4}$`
	// Interval is the interval to check the health of the service
	Interval metav1.Duration `json:"interval"`

	// +kubebuilder:validation:Minimum=0
	// MaxFails is the maximum number of consecutive failed health checks before considering the service as unhealthy
	MaxFails int32 `json:"maxFails"`

	// +optional
	// +kubebuilder:default="5s"
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Pattern=`^([0-9]{1,5}(h|m|s|ms)){1,4}$`
	// FailTimeout is the time before considering the service as healthy if it's marked as unhealthy, even if it's already healthy
	FailTimeout *metav1.Duration `json:"failTimeout,omitempty"`

	// +optional
	// Path is the path to check the health of the HTTP service, if it's not set, the health check will be TCP based
	Path *string `json:"path,omitempty"`

	// +optional
	// +kubebuilder:validation:MaxItems=16
	// Matches is the list of health check match conditions of HTTP service
	Matches []HealthCheckMatch `json:"matches,omitempty"`
}

func (*HealthCheckConfig) DeepCopy

func (in *HealthCheckConfig) DeepCopy() *HealthCheckConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthCheckConfig.

func (*HealthCheckConfig) DeepCopyInto

func (in *HealthCheckConfig) DeepCopyInto(out *HealthCheckConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HealthCheckMatch

type HealthCheckMatch struct {
	// +optional
	// +listType=set
	// +kubebuilder:validation:MaxItems=16
	// StatusCodes is the list of status codes to match
	StatusCodes []int32 `json:"statusCodes,omitempty"`

	// +optional
	// Body is the content of response body to match
	Body *string `json:"body,omitempty"`

	// +optional
	// +listType=map
	// +listMapKey=name
	// +kubebuilder:validation:MaxItems=16
	// Headers is the list of response headers to match
	Headers []gwv1.HTTPHeader `json:"headers,omitempty"`
}

func (*HealthCheckMatch) DeepCopy

func (in *HealthCheckMatch) DeepCopy() *HealthCheckMatch

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthCheckMatch.

func (*HealthCheckMatch) DeepCopyInto

func (in *HealthCheckMatch) DeepCopyInto(out *HealthCheckMatch)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HealthCheckPolicy

type HealthCheckPolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the desired state of HealthCheckPolicy.
	Spec HealthCheckPolicySpec `json:"spec,omitempty"`

	// Status defines the current state of HealthCheckPolicy.
	Status gwv1alpha2.PolicyStatus `json:"status,omitempty"`
}

HealthCheckPolicy provides a way to configure how a Gateway checks the health state of backend service.

func (*HealthCheckPolicy) DeepCopy

func (in *HealthCheckPolicy) DeepCopy() *HealthCheckPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthCheckPolicy.

func (*HealthCheckPolicy) DeepCopyInto

func (in *HealthCheckPolicy) DeepCopyInto(out *HealthCheckPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HealthCheckPolicy) DeepCopyObject

func (in *HealthCheckPolicy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type HealthCheckPolicyList

type HealthCheckPolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []HealthCheckPolicy `json:"items"`
}

HealthCheckPolicyList contains a list of HealthCheckPolicy

func (*HealthCheckPolicyList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthCheckPolicyList.

func (*HealthCheckPolicyList) DeepCopyInto

func (in *HealthCheckPolicyList) DeepCopyInto(out *HealthCheckPolicyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HealthCheckPolicyList) DeepCopyObject

func (in *HealthCheckPolicyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type HealthCheckPolicySpec

type HealthCheckPolicySpec struct {
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=16
	// TargetRefs is the references to the target resources to which the policy is applied
	TargetRefs []gwv1alpha2.NamespacedPolicyTargetReference `json:"targetRefs"`

	// +listType=map
	// +listMapKey=port
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=16
	// Ports is the health check configuration for ports
	Ports []PortHealthCheck `json:"ports,omitempty"`

	// +optional
	// +nullable
	// +kubebuilder:validation:Type=object
	// DefaultHealthCheck is the default health check configuration for all ports
	DefaultHealthCheck *HealthCheckConfig `json:"healthCheck,omitempty"`
}

HealthCheckPolicySpec defines the desired state of HealthCheckPolicy

func (*HealthCheckPolicySpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthCheckPolicySpec.

func (*HealthCheckPolicySpec) DeepCopyInto

func (in *HealthCheckPolicySpec) DeepCopyInto(out *HealthCheckPolicySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LoadBalancerAlgorithm added in v1.4.2

type LoadBalancerAlgorithm string
const (
	LoadBalancerAlgorithmRoundRobin LoadBalancerAlgorithm = "RoundRobin"
	LoadBalancerAlgorithmLeastLoad  LoadBalancerAlgorithm = "LeastLoad"
)

type PortHealthCheck

type PortHealthCheck struct {
	// Port is the port number of the target service
	Port gwv1.PortNumber `json:"port"`

	// +optional
	// +nullable
	// +kubebuilder:validation:Type=object
	// HealthCheck is the health check configuration for the port
	HealthCheck *HealthCheckConfig `json:"healthCheck,omitempty"`
}

func (*PortHealthCheck) DeepCopy

func (in *PortHealthCheck) DeepCopy() *PortHealthCheck

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortHealthCheck.

func (*PortHealthCheck) DeepCopyInto

func (in *PortHealthCheck) DeepCopyInto(out *PortHealthCheck)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PortRetry

type PortRetry struct {
	// Port is the port number of the target service
	Port gwv1.PortNumber `json:"port"`

	// +optional
	// +nullable
	// +kubebuilder:validation:Type=object
	// Config is the retry configuration for the port
	Retry *RetryConfig `json:"retry,omitempty"`
}

PortRetry defines the retry configuration for a port

func (*PortRetry) DeepCopy

func (in *PortRetry) DeepCopy() *PortRetry

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortRetry.

func (*PortRetry) DeepCopyInto

func (in *PortRetry) DeepCopyInto(out *PortRetry)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RetryConfig

type RetryConfig struct {
	// +listType=set
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=16
	// RetryOn is the list of retryable response codes, e.g. 5xx matches 500-599, or 500 matches just 500
	RetryOn []string `json:"retryOn,omitempty"`

	// +optional
	// +kubebuilder:default=3
	// +kubebuilder:validation:Minimum=1
	// NumRetries is the number of retries
	NumRetries *int32 `json:"numRetries,omitempty"`

	// +optional
	// +kubebuilder:default="1s"
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Pattern=`^([0-9]{1,5}(h|m|s|ms)){1,4}$`
	// BackoffBaseInterval is the base interval for computing backoff time between retries, default is 1s
	BackoffBaseInterval *metav1.Duration `json:"backoffBaseInterval,omitempty"`
}

RetryConfig defines the retry configuration

func (*RetryConfig) DeepCopy

func (in *RetryConfig) DeepCopy() *RetryConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetryConfig.

func (*RetryConfig) DeepCopyInto

func (in *RetryConfig) DeepCopyInto(out *RetryConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RetryPolicy

type RetryPolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the desired state of RetryPolicy.
	Spec RetryPolicySpec `json:"spec,omitempty"`

	// Status defines the current state of RetryPolicy.
	Status gwv1alpha2.PolicyStatus `json:"status,omitempty"`
}

RetryPolicy provides a way to configure how a Gateway tries to re-invoke failed backends.

func (*RetryPolicy) DeepCopy

func (in *RetryPolicy) DeepCopy() *RetryPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetryPolicy.

func (*RetryPolicy) DeepCopyInto

func (in *RetryPolicy) DeepCopyInto(out *RetryPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RetryPolicy) DeepCopyObject

func (in *RetryPolicy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RetryPolicyList

type RetryPolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []RetryPolicy `json:"items"`
}

RetryPolicyList contains a list of RetryPolicy

func (*RetryPolicyList) DeepCopy

func (in *RetryPolicyList) DeepCopy() *RetryPolicyList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetryPolicyList.

func (*RetryPolicyList) DeepCopyInto

func (in *RetryPolicyList) DeepCopyInto(out *RetryPolicyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RetryPolicyList) DeepCopyObject

func (in *RetryPolicyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RetryPolicySpec

type RetryPolicySpec struct {
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=16
	// TargetRefs is the references to the target resources to which the policy is applied
	TargetRefs []gwv1alpha2.NamespacedPolicyTargetReference `json:"targetRefs"`

	// +listType=map
	// +listMapKey=port
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:MaxItems=16
	// Ports is the retry configuration for ports
	Ports []PortRetry `json:"ports,omitempty"`

	// +optional
	// +nullable
	// +kubebuilder:validation:Type=object
	// DefaultRetry is the default retry configuration for all ports
	DefaultRetry *RetryConfig `json:"retry,omitempty"`
}

RetryPolicySpec defines the desired state of RetryPolicy

func (*RetryPolicySpec) DeepCopy

func (in *RetryPolicySpec) DeepCopy() *RetryPolicySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetryPolicySpec.

func (*RetryPolicySpec) DeepCopyInto

func (in *RetryPolicySpec) DeepCopyInto(out *RetryPolicySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL