v1alpha1

package
v0.0.0-...-f5c4570 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the standard v1alpha1 API group +kubebuilder:object:generate=true +groupName=standard.oam.dev

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "standard.oam.dev", 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 Autoscaler

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

	Spec   AutoscalerSpec   `json:"spec"`
	Status AutoscalerStatus `json:"status,omitempty"`
}

Autoscaler is the Schema for the autoscalers API

func (*Autoscaler) DeepCopy

func (in *Autoscaler) DeepCopy() *Autoscaler

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

func (*Autoscaler) DeepCopyInto

func (in *Autoscaler) DeepCopyInto(out *Autoscaler)

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

func (*Autoscaler) DeepCopyObject

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

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

type AutoscalerList

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

AutoscalerList contains a list of Autoscaler

func (*AutoscalerList) DeepCopy

func (in *AutoscalerList) DeepCopy() *AutoscalerList

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

func (*AutoscalerList) DeepCopyInto

func (in *AutoscalerList) DeepCopyInto(out *AutoscalerList)

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

func (*AutoscalerList) DeepCopyObject

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

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

type AutoscalerSpec

type AutoscalerSpec struct {
	// MinReplicas is the minimal replicas
	// +optional
	MinReplicas *int32 `json:"minReplicas,omitempty"`

	// MinReplicas is the maximal replicas
	// +optional
	MaxReplicas *int32 `json:"maxReplicas,omitempty"`

	// Triggers lists all triggers
	Triggers []Trigger `json:"triggers"`

	// TargetWorkload specify the workload which is about to be scaled
	TargetWorkload TargetWorkload `json:"targetWorkload,omitempty"`
}

AutoscalerSpec defines the desired state of Autoscaler

func (*AutoscalerSpec) DeepCopy

func (in *AutoscalerSpec) DeepCopy() *AutoscalerSpec

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

func (*AutoscalerSpec) DeepCopyInto

func (in *AutoscalerSpec) DeepCopyInto(out *AutoscalerSpec)

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

type AutoscalerStatus

type AutoscalerStatus struct {
}

AutoscalerStatus defines the observed state of Autoscaler

func (*AutoscalerStatus) DeepCopy

func (in *AutoscalerStatus) DeepCopy() *AutoscalerStatus

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

func (*AutoscalerStatus) DeepCopyInto

func (in *AutoscalerStatus) DeepCopyInto(out *AutoscalerStatus)

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

type CronTypeCondition

type CronTypeCondition struct {
	// StartAt is the time when the scaler starts, in format `"HHMM"` for example, "08:00"
	StartAt string `json:"startAt,omitempty"`

	// Duration means how long the target scaling will keep, after the time of duration, the scaling will stop
	Duration string `json:"duration,omitempty"`

	// Days means in which days the condition will take effect
	Days []string `json:"days,omitempty"`

	// Replicas is the expected replicas
	Replicas int `json:"replicas,omitempty"`

	// Timezone defines the time zone, default to the timezone of the Kubernetes cluster
	Timezone string `json:"timezone,omitempty"`
}

func (*CronTypeCondition) DeepCopy

func (in *CronTypeCondition) DeepCopy() *CronTypeCondition

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

func (*CronTypeCondition) DeepCopyInto

func (in *CronTypeCondition) DeepCopyInto(out *CronTypeCondition)

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

type DefaultCondition

type DefaultCondition struct {
	// Target is the threshold value to the metric
	Target *int32 `json:"target,omitempty"`
}

func (*DefaultCondition) DeepCopy

func (in *DefaultCondition) DeepCopy() *DefaultCondition

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

func (*DefaultCondition) DeepCopyInto

func (in *DefaultCondition) DeepCopyInto(out *DefaultCondition)

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

type Protocol

type Protocol string

Protocol defines network protocols supported for things like container ports.

type TargetWorkload

type TargetWorkload struct {
	Name string `json:"name"`
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`
	// +optional
	Kind string `json:"kind,omitempty"`
}

TargetWorkload holds the a reference to the scale target Object

func (*TargetWorkload) DeepCopy

func (in *TargetWorkload) DeepCopy() *TargetWorkload

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

func (*TargetWorkload) DeepCopyInto

func (in *TargetWorkload) DeepCopyInto(out *TargetWorkload)

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

type Trigger

type Trigger struct {
	// Name is the trigger name, if not set, it will be automatically generated and make it globally unique
	Name string `json:"name,omitempty"`

	// Enabled marks whether the trigger immediately. Defaults to `true`
	Enabled bool `json:"enabled,omitempty"`

	// Type allows value in [cpu/memory/storage/ephemeral-storage、cron、pps、qps/rps、custom]
	Type TriggerType `json:"type"`

	// Condition set the condition when to trigger scaling
	Condition TriggerCondition `json:"condition"`
}

Trigger defines the trigger of Autoscaler

func (*Trigger) DeepCopy

func (in *Trigger) DeepCopy() *Trigger

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

func (*Trigger) DeepCopyInto

func (in *Trigger) DeepCopyInto(out *Trigger)

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

type TriggerCondition

type TriggerCondition struct {
	// DefaultCondition is the condition for resource types, like `cpu/memory/storage/ephemeral-storage`
	*DefaultCondition `json:",inline,omitempty"`

	// CronTypeCondition is the condition for Cron type scaling, `cron`
	*CronTypeCondition `json:",inline,omitempty"`
}

TriggerCondition set the condition when to trigger scaling

func (*TriggerCondition) DeepCopy

func (in *TriggerCondition) DeepCopy() *TriggerCondition

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

func (*TriggerCondition) DeepCopyInto

func (in *TriggerCondition) DeepCopyInto(out *TriggerCondition)

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

type TriggerType

type TriggerType string

TriggerType defines the type of trigger

Jump to

Keyboard shortcuts

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