v1alpha1

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the http v1alpha1 API group +kubebuilder:object:generate=true +groupName=http.keda.sh

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "http.keda.sh", Version: "v1alpha1"}

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

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

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type ConcurrencyMetricSpec added in v0.8.0

type ConcurrencyMetricSpec struct {
	// Target value for rate scaling
	// +kubebuilder:default=100
	// +optional
	TargetValue int `json:"targetValue" description:"Target value for concurrency scaling"`
}

ConcurrencyMetricSpec defines the concurrency scaling

func (*ConcurrencyMetricSpec) DeepCopy added in v0.8.0

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

func (*ConcurrencyMetricSpec) DeepCopyInto added in v0.8.0

func (in *ConcurrencyMetricSpec) DeepCopyInto(out *ConcurrencyMetricSpec)

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

type Conditions added in v0.8.0

type Conditions []HTTPScaledObjectCondition

func GetInitializedConditions added in v0.8.0

func GetInitializedConditions() *Conditions

GetInitializedConditions returns Conditions initialized to the default -> Status: Unknown

func (Conditions) DeepCopy added in v0.8.0

func (in Conditions) DeepCopy() Conditions

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

func (Conditions) DeepCopyInto added in v0.8.0

func (in Conditions) DeepCopyInto(out *Conditions)

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

func (*Conditions) GetReadyCondition added in v0.8.0

func (c *Conditions) GetReadyCondition() HTTPScaledObjectCondition

GetReadyCondition returns Condition of type Ready

type HTTPScaledObject

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

	Spec   HTTPScaledObjectSpec   `json:"spec,omitempty"`
	Status HTTPScaledObjectStatus `json:"status,omitempty"`
}

HTTPScaledObject is the Schema for the httpscaledobjects API

func (*HTTPScaledObject) DeepCopy

func (in *HTTPScaledObject) DeepCopy() *HTTPScaledObject

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

func (*HTTPScaledObject) DeepCopyInto

func (in *HTTPScaledObject) DeepCopyInto(out *HTTPScaledObject)

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

func (*HTTPScaledObject) DeepCopyObject

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

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

type HTTPScaledObjectCondition

type HTTPScaledObjectCondition struct {
	// Timestamp of the condition
	// +optional
	Timestamp string `json:"timestamp" description:"Timestamp of this condition"`
	// Type of condition
	// +required
	Type HTTPScaledObjectCreationStatus `json:"type" description:"type of status condition"`
	// Status of the condition, one of True, False, Unknown.
	// +required
	Status metav1.ConditionStatus `json:"status" description:"status of the condition, one of True, False, Unknown"`
	// Reason for the condition's last transition.
	// +optional
	Reason HTTPScaledObjectConditionReason `json:"reason,omitempty" description:"one-word CamelCase reason for the condition's last transition"`
	// Message indicating details about the transition.
	// +optional
	Message string `json:"message,omitempty" description:"human-readable message indicating details about last transition"`
}

HTTPScaledObjectCondition stores the condition state

func (*HTTPScaledObjectCondition) DeepCopy

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

func (*HTTPScaledObjectCondition) DeepCopyInto

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

func (*HTTPScaledObjectCondition) IsFalse added in v0.8.0

func (c *HTTPScaledObjectCondition) IsFalse() bool

IsFalse is true if the condition is False

func (*HTTPScaledObjectCondition) IsTrue added in v0.8.0

func (c *HTTPScaledObjectCondition) IsTrue() bool

IsTrue is true if the condition is True

type HTTPScaledObjectConditionReason

type HTTPScaledObjectConditionReason string

HTTPScaledObjectConditionReason describes the reason why the condition transitioned

const (
	ErrorCreatingAppScaledObject    HTTPScaledObjectConditionReason = "ErrorCreatingAppScaledObject"
	AppScaledObjectCreated          HTTPScaledObjectConditionReason = "AppScaledObjectCreated"
	TerminatingResources            HTTPScaledObjectConditionReason = "TerminatingResources"
	AppScaledObjectTerminated       HTTPScaledObjectConditionReason = "AppScaledObjectTerminated"
	AppScaledObjectTerminationError HTTPScaledObjectConditionReason = "AppScaledObjectTerminationError"
	PendingCreation                 HTTPScaledObjectConditionReason = "PendingCreation"
	HTTPScaledObjectIsReady         HTTPScaledObjectConditionReason = "HTTPScaledObjectIsReady"
)

type HTTPScaledObjectCreationStatus

type HTTPScaledObjectCreationStatus string

HTTPScaledObjectCreationStatus describes the creation status of the scaler's additional resources such as Services, Ingresses and Deployments

const (
	// Ready indicates the object is fully created
	Ready HTTPScaledObjectCreationStatus = "Ready"
)

type HTTPScaledObjectList

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

HTTPScaledObjectList contains a list of HTTPScaledObject

func (*HTTPScaledObjectList) DeepCopy

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

func (*HTTPScaledObjectList) DeepCopyInto

func (in *HTTPScaledObjectList) DeepCopyInto(out *HTTPScaledObjectList)

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

func (*HTTPScaledObjectList) DeepCopyObject

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

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

type HTTPScaledObjectSpec

type HTTPScaledObjectSpec struct {
	// The hosts to route. All requests which the "Host" header
	// matches any .spec.hosts (and the Request Target matches any
	// .spec.pathPrefixes) will be routed to the Service and Port specified in
	// the scaleTargetRef.
	Hosts []string `json:"hosts,omitempty"`
	// The paths to route. All requests which the Request Target matches any
	// .spec.pathPrefixes (and the "Host" header matches any .spec.hosts)
	// will be routed to the Service and Port specified in
	// the scaleTargetRef.
	// +optional
	PathPrefixes []string `json:"pathPrefixes,omitempty"`
	// The name of the deployment to route HTTP requests to (and to autoscale).
	ScaleTargetRef ScaleTargetRef `json:"scaleTargetRef"`
	// (optional) Replica information
	// +optional
	Replicas *ReplicaStruct `json:"replicas,omitempty"`
	// (optional) DEPRECATED (use SscalingMetric instead) Target metric value
	// +optional
	TargetPendingRequests *int32 `json:"targetPendingRequests,omitempty" description:"The target metric value for the HPA (Default 100)"`
	// (optional) Cooldown period value
	// +optional
	CooldownPeriod *int32 `json:"scaledownPeriod,omitempty" description:"Cooldown period (seconds) for resources to scale down (Default 300)"`
	// (optional) Configuration for the metric used for scaling
	// +optional
	ScalingMetric *ScalingMetricSpec `` /* 127-byte string literal not displayed */
}

HTTPScaledObjectSpec defines the desired state of HTTPScaledObject

func (*HTTPScaledObjectSpec) DeepCopy

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

func (*HTTPScaledObjectSpec) DeepCopyInto

func (in *HTTPScaledObjectSpec) DeepCopyInto(out *HTTPScaledObjectSpec)

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

type HTTPScaledObjectStatus

type HTTPScaledObjectStatus struct {
	// TargetWorkload reflects details about the scaled workload.
	// +optional
	TargetWorkload string `json:"targetWorkload,omitempty" description:"It reflects details about the scaled workload"`
	// TargetService reflects details about the scaled service.
	// +optional
	TargetService string `json:"targetService,omitempty" description:"It reflects details about the scaled service"`
	// Conditions of the operator
	Conditions Conditions `json:"conditions,omitempty" description:"List of auditable conditions of the operator"`
}

HTTPScaledObjectStatus defines the observed state of HTTPScaledObject

func (*HTTPScaledObjectStatus) DeepCopy

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

func (*HTTPScaledObjectStatus) DeepCopyInto

func (in *HTTPScaledObjectStatus) DeepCopyInto(out *HTTPScaledObjectStatus)

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

type RateMetricSpec added in v0.8.0

type RateMetricSpec struct {
	// Target value for rate scaling
	// +kubebuilder:default=100
	// +optional
	TargetValue int `json:"targetValue" description:"Target value for rate scaling"`
	// Time window for rate calculation
	// +kubebuilder:default="1m"
	// +optional
	Window metav1.Duration `json:"window" description:"Time window for rate calculation"`
	// Time granularity for rate calculation
	// +kubebuilder:default="1s"
	// +optional
	Granularity metav1.Duration `json:"granularity" description:"Time granularity for rate calculation"`
}

RateMetricSpec defines the concurrency scaling

func (*RateMetricSpec) DeepCopy added in v0.8.0

func (in *RateMetricSpec) DeepCopy() *RateMetricSpec

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

func (*RateMetricSpec) DeepCopyInto added in v0.8.0

func (in *RateMetricSpec) DeepCopyInto(out *RateMetricSpec)

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

type ReplicaStruct

type ReplicaStruct struct {
	// Minimum amount of replicas to have in the deployment (Default 0)
	Min *int32 `json:"min,omitempty" description:"Minimum amount of replicas to have in the deployment (Default 0)"`
	// Maximum amount of replicas to have in the deployment (Default 100)
	Max *int32 `json:"max,omitempty" description:"Maximum amount of replicas to have in the deployment (Default 100)"`
}

ReplicaStruct contains the minimum and maximum amount of replicas to have in the deployment

func (*ReplicaStruct) DeepCopy

func (in *ReplicaStruct) DeepCopy() *ReplicaStruct

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

func (*ReplicaStruct) DeepCopyInto

func (in *ReplicaStruct) DeepCopyInto(out *ReplicaStruct)

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

type ScaleTargetRef

type ScaleTargetRef struct {
	// Deprecated: The name of the deployment to scale according to HTTP traffic
	// +optional
	Deployment string `json:"deployment"`
	// +optional
	Name string `json:"name"`
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`
	// +optional
	Kind string `json:"kind,omitempty"`
	// The name of the service to route to
	Service string `json:"service"`
	// The port to route to
	Port int32 `json:"port"`
}

ScaleTargetRef contains all the details about an HTTP application to scale and route to

func (*ScaleTargetRef) DeepCopy

func (in *ScaleTargetRef) DeepCopy() *ScaleTargetRef

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

func (*ScaleTargetRef) DeepCopyInto

func (in *ScaleTargetRef) DeepCopyInto(out *ScaleTargetRef)

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

type ScalingMetricSpec added in v0.8.0

type ScalingMetricSpec struct {
	// Scaling based on concurrent requests for a given target
	Concurrency *ConcurrencyMetricSpec `` /* 148-byte string literal not displayed */
	// Scaling based the average rate during an specific time window for a given target
	Rate *RateMetricSpec `` /* 173-byte string literal not displayed */
}

ScalingMetricSpec contains the scaling calculation type

func (*ScalingMetricSpec) DeepCopy added in v0.8.0

func (in *ScalingMetricSpec) DeepCopy() *ScalingMetricSpec

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

func (*ScalingMetricSpec) DeepCopyInto added in v0.8.0

func (in *ScalingMetricSpec) DeepCopyInto(out *ScalingMetricSpec)

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