v1

package
v0.0.0-...-4384b37 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the v1 API group +kubebuilder:object:generate=true +groupName=k8s.q1.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "k8s.q1.com", Version: "v1"}

	// 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 Condition

type Condition struct {
	UID             string      `json:"uid"`
	Status          Status      `json:"status"`
	LastProbeTime   metav1.Time `json:"lastProbeTime"`
	DesiredReplicas int32       `json:"desiredReplicas"`
	// Human readable message indicating details about last transition.
	// +optional
	Message string `json:"message"`
}

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

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

type Config

type Config map[string]string

func (Config) DeepCopy

func (in Config) DeepCopy() Config

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

func (Config) DeepCopyInto

func (in Config) DeepCopyInto(out *Config)

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

type HPAScaler

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

	Spec   HPAScalerSpec   `json:"spec,omitempty"`
	Status HPAScalerStatus `json:"status,omitempty"`
}

HPAScaler is the Schema for the hpascalers API

func (*HPAScaler) DeepCopy

func (in *HPAScaler) DeepCopy() *HPAScaler

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

func (*HPAScaler) DeepCopyInto

func (in *HPAScaler) DeepCopyInto(out *HPAScaler)

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

func (*HPAScaler) DeepCopyObject

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

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

type HPAScalerList

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

HPAScalerList contains a list of HPAScaler

func (*HPAScalerList) DeepCopy

func (in *HPAScalerList) DeepCopy() *HPAScalerList

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

func (*HPAScalerList) DeepCopyInto

func (in *HPAScalerList) DeepCopyInto(out *HPAScalerList)

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

func (*HPAScalerList) DeepCopyObject

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

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

type HPAScalerSpec

type HPAScalerSpec struct {
	ScaleTargetRef               ScaleTargetRef `json:"scaleTargetRef"`
	Freq                         string         `json:"freq"`
	Plugin                       Plugin         `json:"plugin"`
	MaxReplicas                  int32          `json:"maxReplicas,omitempty"`
	MinReplicas                  int32          `json:"minReplicas,omitempty"`
	ScaleUp                      Scale          `json:"scaleUp,omitempty"`
	ScaleDown                    Scale          `json:"scaleDown,omitempty"`
	DownscaleStabilisationWindow string         `json:"downscaleStabilisationWindow,omitempty" default:"3m"`
}

HPAScalerSpec defines the desired state of HPAScaler

func (*HPAScalerSpec) DeepCopy

func (in *HPAScalerSpec) DeepCopy() *HPAScalerSpec

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

func (*HPAScalerSpec) DeepCopyInto

func (in *HPAScalerSpec) DeepCopyInto(out *HPAScalerSpec)

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

func (*HPAScalerSpec) ToString

func (hs *HPAScalerSpec) ToString() string

type HPAScalerStatus

type HPAScalerStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	// +kubebuilder:validation:Required
	Condition Condition `json:"condition,omitempty"`
}

HPAScalerStatus defines the observed state of HPAScaler

func (*HPAScalerStatus) DeepCopy

func (in *HPAScalerStatus) DeepCopy() *HPAScalerStatus

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

func (*HPAScalerStatus) DeepCopyInto

func (in *HPAScalerStatus) DeepCopyInto(out *HPAScalerStatus)

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

type Plugin

type Plugin struct {
	Type   string `json:"type"`
	Config Config `json:"config,omitempty"`
}

func (*Plugin) DeepCopy

func (in *Plugin) DeepCopy() *Plugin

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

func (*Plugin) DeepCopyInto

func (in *Plugin) DeepCopyInto(out *Plugin)

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

type Scale

type Scale struct {
	Threshold int64 `json:"threshold,omitempty"` // 触发临界值
	Amount    int32 `json:"amount,omitempty"`    // 增加或减少的数量
}

func (*Scale) DeepCopy

func (in *Scale) DeepCopy() *Scale

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

func (*Scale) DeepCopyInto

func (in *Scale) DeepCopyInto(out *Scale)

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

type ScaleTargetRef

type ScaleTargetRef struct {
	Kind string `json:"kind"` // "Deployment" or "StatefulSet" Or "Node"
	Name string `json:"name"`
}

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 Status

type Status string
const (
	Succeed   Status = "Succeed"
	Failed    Status = "Failed"
	Submitted Status = "Submitted"
)

Jump to

Keyboard shortcuts

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