v1alpha2

package
v1.4.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 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 HealthCheckConfig

type HealthCheckConfig struct {
	// +kubebuilder:validation:Minimum=1
	// Interval is the interval in seconds to check the health of the service
	Interval int32 `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:validation:Minimum=0
	// FailTimeout is the time in seconds before considering the service as healthy if it's marked as unhealthy, even if it's already healthy
	FailTimeout *int32 `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
	// 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 PortHealthCheck

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

	// +optional
	// 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
	// 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=1.0
	// +kubebuilder:validation:Minimum=0.001
	// BackoffBaseInterval is the base interval for computing backoff in seconds
	BackoffBaseInterval *float32 `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
	// 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