v1alpha1

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 10

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the limitador v1alpha1 API group +kubebuilder:object:generate=true +groupName=limitador.kuadrant.io

Index

Constants

View Source
const (
	DefaultServiceHTTPPort int32 = 8080
	DefaultServiceGRPCPort int32 = 8081

	// Status conditions
	StatusConditionReady string = "Ready"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "limitador.kuadrant.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type DiskOptimizeType added in v0.7.0

type DiskOptimizeType string

DiskOptimizeType defines the valid options for "optimize" option of the disk persistence type +kubebuilder:validation:Enum=throughput;disk

const (
	DiskOptimizeTypeThroughput DiskOptimizeType = "throughput"
	DiskOptimizeTypeDisk       DiskOptimizeType = "disk"
)

type DiskSpec added in v0.7.0

type DiskSpec struct {
	// +optional
	PVC *PVCGenericSpec `json:"persistentVolumeClaim,omitempty"`

	// +optional
	Optimize *DiskOptimizeType `json:"optimize,omitempty"`
}

func (*DiskSpec) DeepCopy added in v0.7.0

func (in *DiskSpec) DeepCopy() *DiskSpec

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

func (*DiskSpec) DeepCopyInto added in v0.7.0

func (in *DiskSpec) DeepCopyInto(out *DiskSpec)

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

type Limitador

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

	// +kubebuilder:validation:Optional
	// +kubebuilder:validation:XValidation:rule="(!has(self.storage) || !has(self.storage.disk)) || (!has(self.replicas) || self.replicas < 2)",message="disk storage does not allow multiple replicas"
	Spec   LimitadorSpec   `json:"spec,omitempty"`
	Status LimitadorStatus `json:"status,omitempty"`
}

Limitador is the Schema for the limitadors API

func (*Limitador) DeepCopy

func (in *Limitador) DeepCopy() *Limitador

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

func (*Limitador) DeepCopyInto

func (in *Limitador) DeepCopyInto(out *Limitador)

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

func (*Limitador) DeepCopyObject

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

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

func (*Limitador) GRPCPort

func (l *Limitador) GRPCPort() int32

func (*Limitador) GetResourceRequirements added in v0.6.0

func (l *Limitador) GetResourceRequirements() *corev1.ResourceRequirements

func (*Limitador) HTTPPort

func (l *Limitador) HTTPPort() int32

func (*Limitador) Limits

func (l *Limitador) Limits() []RateLimit

type LimitadorList

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

LimitadorList contains a list of Limitador

func (*LimitadorList) DeepCopy

func (in *LimitadorList) DeepCopy() *LimitadorList

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

func (*LimitadorList) DeepCopyInto

func (in *LimitadorList) DeepCopyInto(out *LimitadorList)

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

func (*LimitadorList) DeepCopyObject

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

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

type LimitadorService

type LimitadorService struct {
	Host  string `json:"host,omitempty"`
	Ports Ports  `json:"ports,omitempty"`
}

func (*LimitadorService) DeepCopy

func (in *LimitadorService) DeepCopy() *LimitadorService

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

func (*LimitadorService) DeepCopyInto

func (in *LimitadorService) DeepCopyInto(out *LimitadorService)

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

type LimitadorSpec

type LimitadorSpec struct {

	// +optional
	Affinity *corev1.Affinity `json:"affinity,omitempty"`

	// +optional
	Replicas *int `json:"replicas,omitempty"`

	// +optional
	Version *string `json:"version,omitempty"`

	// +optional
	Listener *Listener `json:"listener,omitempty"`

	// +optional
	Storage *Storage `json:"storage,omitempty"`

	// +optional
	RateLimitHeaders *RateLimitHeadersType `json:"rateLimitHeaders,omitempty"`

	// +optional
	Telemetry *Telemetry `json:"telemetry,omitempty"`

	// +optional
	Limits []RateLimit `json:"limits,omitempty"`

	// +optional
	PodDisruptionBudget *PodDisruptionBudgetType `json:"pdb,omitempty"`

	// +optional
	ResourceRequirements *corev1.ResourceRequirements `json:"resourceRequirements,omitempty"`
}

LimitadorSpec defines the desired state of Limitador

func (*LimitadorSpec) DeepCopy

func (in *LimitadorSpec) DeepCopy() *LimitadorSpec

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

func (*LimitadorSpec) DeepCopyInto

func (in *LimitadorSpec) DeepCopyInto(out *LimitadorSpec)

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

type LimitadorStatus

type LimitadorStatus struct {
	// ObservedGeneration reflects the generation of the most recently observed spec.
	// +optional
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`

	// Represents the observations of a foo's current state.
	// Known .status.conditions.type are: "Available"
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`

	// Service provides information about the service exposing limitador API
	// +optional
	Service *LimitadorService `json:"service,omitempty"`
}

LimitadorStatus defines the observed state of Limitador

func (*LimitadorStatus) DeepCopy

func (in *LimitadorStatus) DeepCopy() *LimitadorStatus

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

func (*LimitadorStatus) DeepCopyInto

func (in *LimitadorStatus) DeepCopyInto(out *LimitadorStatus)

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

func (*LimitadorStatus) Equals added in v0.4.0

func (s *LimitadorStatus) Equals(other *LimitadorStatus, logger logr.Logger) bool

type Listener

type Listener struct {
	// +optional
	HTTP *TransportProtocol `json:"http,omitempty"`
	// +optional
	GRPC *TransportProtocol `json:"grpc,omitempty"`
}

func (*Listener) DeepCopy

func (in *Listener) DeepCopy() *Listener

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

func (*Listener) DeepCopyInto

func (in *Listener) DeepCopyInto(out *Listener)

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

type PVCGenericSpec added in v0.7.0

type PVCGenericSpec struct {
	// +optional
	StorageClassName *string `json:"storageClassName,omitempty"`
	// Resources represents the minimum resources the volume should have.
	// Ignored when VolumeName field is set
	// +optional
	Resources *PersistentVolumeClaimResources `json:"resources,omitempty"`
	// VolumeName is the binding reference to the PersistentVolume backing this claim.
	// +optional
	VolumeName *string `json:"volumeName,omitempty"`
}

func (*PVCGenericSpec) DeepCopy added in v0.7.0

func (in *PVCGenericSpec) DeepCopy() *PVCGenericSpec

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

func (*PVCGenericSpec) DeepCopyInto added in v0.7.0

func (in *PVCGenericSpec) DeepCopyInto(out *PVCGenericSpec)

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

type PersistentVolumeClaimResources added in v0.7.0

type PersistentVolumeClaimResources struct {
	// Storage Resource requests to be used on the PersistentVolumeClaim.
	// To learn more about resource requests see:
	// https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
	Requests resource.Quantity `json:"requests"` // Should this be a string or a resoure.Quantity? it seems it is serialized as a string
}

PersistentVolumeClaimResources defines the resources configuration of the backup data destination PersistentVolumeClaim

func (*PersistentVolumeClaimResources) DeepCopy added in v0.7.0

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

func (*PersistentVolumeClaimResources) DeepCopyInto added in v0.7.0

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

type PodDisruptionBudgetType added in v0.6.0

type PodDisruptionBudgetType struct {
	// An eviction is allowed if at most "maxUnavailable" limitador pods
	// are unavailable after the eviction, i.e. even in absence of
	// the evicted pod. For example, one can prevent all voluntary evictions
	// by specifying 0. This is a mutually exclusive setting with "minAvailable".
	// +optional
	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
	// An eviction is allowed if at least "minAvailable" limitador pods will
	// still be available after the eviction, i.e. even in the absence of
	// the evicted pod.  So for example you can prevent all voluntary
	// evictions by specifying "100%".
	// +optional
	MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty"`
}

func (*PodDisruptionBudgetType) DeepCopy added in v0.6.0

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

func (*PodDisruptionBudgetType) DeepCopyInto added in v0.6.0

func (in *PodDisruptionBudgetType) DeepCopyInto(out *PodDisruptionBudgetType)

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

type Ports

type Ports struct {
	HTTP int32 `json:"http,omitempty"`
	GRPC int32 `json:"grpc,omitempty"`
}

func (*Ports) DeepCopy

func (in *Ports) DeepCopy() *Ports

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

func (*Ports) DeepCopyInto

func (in *Ports) DeepCopyInto(out *Ports)

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

type RateLimit

type RateLimit struct {
	Conditions []string `json:"conditions"`
	MaxValue   int      `json:"max_value"`
	Namespace  string   `json:"namespace"`
	Seconds    int      `json:"seconds"`
	Variables  []string `json:"variables"`
	Name       string   `json:"name,omitempty"`
}

RateLimit defines the desired Limitador limit

func (*RateLimit) DeepCopy

func (in *RateLimit) DeepCopy() *RateLimit

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

func (*RateLimit) DeepCopyInto

func (in *RateLimit) DeepCopyInto(out *RateLimit)

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

type RateLimitHeadersType added in v0.5.0

type RateLimitHeadersType string

RateLimitHeadersType defines the valid options for the --rate-limit-headers arg +kubebuilder:validation:Enum=NONE;DRAFT_VERSION_03

const (
	RateLimitHeadersTypeNONE    RateLimitHeadersType = "NONE"
	RateLimitHeadersTypeDraft03 RateLimitHeadersType = "DRAFT_VERSION_03"
)

type Redis added in v0.4.0

type Redis struct {
	// +ConfigSecretRef refers to the secret holding the URL for Redis.
	// +optional
	ConfigSecretRef *corev1.LocalObjectReference `json:"configSecretRef,omitempty"`
}

func (*Redis) DeepCopy added in v0.4.0

func (in *Redis) DeepCopy() *Redis

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

func (*Redis) DeepCopyInto added in v0.4.0

func (in *Redis) DeepCopyInto(out *Redis)

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

type RedisCached added in v0.4.0

type RedisCached struct {
	// +ConfigSecretRef refers to the secret holding the URL for Redis.
	// +optional
	ConfigSecretRef *corev1.LocalObjectReference `json:"configSecretRef,omitempty"`

	// +optional
	Options *RedisCachedOptions `json:"options,omitempty"`
}

func (*RedisCached) DeepCopy added in v0.4.0

func (in *RedisCached) DeepCopy() *RedisCached

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

func (*RedisCached) DeepCopyInto added in v0.4.0

func (in *RedisCached) DeepCopyInto(out *RedisCached)

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

type RedisCachedOptions added in v0.4.0

type RedisCachedOptions struct {
	// +optional
	// TTL for cached counters in milliseconds [default: 5000]
	TTL *int `json:"ttl,omitempty"`

	// +optional
	// Ratio to apply to the TTL from Redis on cached counters [default: 10]
	Ratio *int `json:"ratio,omitempty"`

	// +optional
	// FlushPeriod for counters in milliseconds [default: 1000]
	FlushPeriod *int `json:"flush-period,omitempty"`

	// +optional
	// MaxCached refers to the maximum amount of counters cached [default: 10000]
	MaxCached *int `json:"max-cached,omitempty"`
}

func (*RedisCachedOptions) DeepCopy added in v0.4.0

func (in *RedisCachedOptions) DeepCopy() *RedisCachedOptions

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

func (*RedisCachedOptions) DeepCopyInto added in v0.4.0

func (in *RedisCachedOptions) DeepCopyInto(out *RedisCachedOptions)

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

type Storage added in v0.4.0

type Storage struct {
	// +optional
	Redis *Redis `json:"redis,omitempty"`

	// +optional
	RedisCached *RedisCached `json:"redis-cached,omitempty"`

	// +optional
	Disk *DiskSpec `json:"disk,omitempty"`
}

Storage contains the options for Limitador counters database or in-memory data storage

func (*Storage) DeepCopy added in v0.4.0

func (in *Storage) DeepCopy() *Storage

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

func (*Storage) DeepCopyInto added in v0.4.0

func (in *Storage) DeepCopyInto(out *Storage)

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

type Telemetry added in v0.7.0

type Telemetry string

Telemetry defines the level of metrics Limitador will expose to the user +kubebuilder:validation:Enum=basic;exhaustive

const (
	TelemetryBasic      Telemetry = "basic"
	TelemetryExhaustive Telemetry = "exhaustive"
)

type TransportProtocol

type TransportProtocol struct {
	// +optional
	Port *int32 `json:"port,omitempty"`
}

func (*TransportProtocol) DeepCopy

func (in *TransportProtocol) DeepCopy() *TransportProtocol

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

func (*TransportProtocol) DeepCopyInto

func (in *TransportProtocol) DeepCopyInto(out *TransportProtocol)

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