v1alpha1

package
v0.0.0-...-a67e8b1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: Apache-2.0 Imports: 5 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 +kubebuilder:object:root=true +kubebuilder:resource:categories={oam}

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.

func (*Autoscaler) GetCondition

func (as *Autoscaler) GetCondition(conditionType v1alpha1.ConditionType) v1alpha1.Condition

GetCondition get condition from CR status

func (*Autoscaler) GetWorkloadReference

func (as *Autoscaler) GetWorkloadReference() v1alpha1.TypedReference

GetWorkloadReference get workload reference

func (*Autoscaler) SetConditions

func (as *Autoscaler) SetConditions(c ...v1alpha1.Condition)

SetConditions set condition for CR status

func (*Autoscaler) SetWorkloadReference

func (as *Autoscaler) SetWorkloadReference(reference v1alpha1.TypedReference)

SetWorkloadReference set workload reference

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 going to be scaled,
	// it could be WorkloadReference or the child resource of it
	TargetWorkload TargetWorkload `json:"targetWorkload,omitempty"`

	// WorkloadReference marks the owner of the workload
	WorkloadReference v1alpha1.TypedReference `json:"workloadRef,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 {
	v1alpha1.ConditionedStatus `json:",inline"`
}

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 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"`

	// 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 map[string]string `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 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