v1

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the autoscaling v1 API group +kubebuilder:object:generate=true +groupName=autoscaling.d-kuro.github.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "autoscaling.d-kuro.github.io", 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 Schedule

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

	Spec   ScheduleSpec   `json:"spec,omitempty"`
	Status ScheduleStatus `json:"status,omitempty"`
}

Schedule is the Schema for the schedules API.

func (*Schedule) DeepCopy

func (in *Schedule) DeepCopy() *Schedule

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

func (*Schedule) DeepCopyInto

func (in *Schedule) DeepCopyInto(out *Schedule)

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

func (*Schedule) DeepCopyObject

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

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

type ScheduleConditionType

type ScheduleConditionType string
const (
	ScheduleAvailable   ScheduleConditionType = "Available"
	ScheduleSuspend     ScheduleConditionType = "Suspend"
	ScheduleProgressing ScheduleConditionType = "Progressing"
	ScheduleDegraded    ScheduleConditionType = "Degraded"
	ScheduleCompleted   ScheduleConditionType = "Completed"
)

type ScheduleList

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

ScheduleList contains a list of Schedule.

func (*ScheduleList) DeepCopy

func (in *ScheduleList) DeepCopy() *ScheduleList

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

func (*ScheduleList) DeepCopyInto

func (in *ScheduleList) DeepCopyInto(out *ScheduleList)

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

func (*ScheduleList) DeepCopyObject

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

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

type ScheduleSpec

type ScheduleSpec struct {

	// ScaleTargetRef points to the target resource to scale, and is used to the pods for which metrics
	// should be collected, as well as to actually change the replica count.
	// +kubebuiler:validation:Required
	ScaleTargetRef autoscalingv2beta2.CrossVersionObjectReference `json:"scaleTargetRef"`

	// Suspend indicates whether to suspend this schedule. (default is false)
	// +optional
	Suspend bool `json:"suspend"`

	// Description is schedule description.
	// +optional
	Description string `json:"description,omitempty"`

	// TimeZone is the name of the timezone used in the argument of the time.LoadLocation(name string) function.
	// StartTime and EndTime are interpreted as the time in the time zone specified by TimeZone.
	// If not specified, the time will be interpreted as UTC.
	// +optional
	TimeZone string `json:"timeZone,omitempty"`

	// MinReplicas is the lower limit for the number of replicas to which the autoscaler can scale down.
	// It defaults to 1 pod.
	// +kubebuilder:validation:Minimum=1
	// +optional
	MinReplicas *int32 `json:"minReplicas,omitempty"`

	// MaxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
	// +kubebuilder:validation:Minimum=1
	// +optional
	MaxReplicas *int32 `json:"maxReplicas,omitempty"`

	// ScheduleType is a type of schedule represented by "Weekly", "Daily", "OneShot".
	// +kubebuiler:validation:Required
	// +kubebuilder:validation:Enum=Weekly;Daily;OneShot
	ScheduleType ScheduleType `json:"type"`

	// StartDayOfWeek is scaling start day of week.
	// Represented by "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday".
	// +kubebuilder:validation:Enum=Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;""
	// +optional
	StartDayOfWeek string `json:"startDayOfWeek"`

	// EndDayOfWeek is scaling end day of week.
	// Represented by "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday".
	// +kubebuilder:validation:Enum=Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;""
	// +optional
	EndDayOfWeek string `json:"endDayOfWeek"`

	// StartTime is scaling start time. Defined in RFC3339 based format.
	// Different formats are evaluated depending on ScheduleType.
	// e.g. OneShot(yyyy-MM-ddTHH:mm), Weekly(HH:mm), Daily(HH:mm)
	// +kubebuiler:validation:Required
	StartTime string `json:"startTime"`

	// EndTime is scaling end time. Defined in RFC3339 based format.
	// Different formats are evaluated depending on ScheduleType.
	// e.g. OneShot(yyyy-MM-ddTHH:mm), Weekly(HH:mm), Daily(HH:mm)
	// +kubebuiler:validation:Required
	EndTime string `json:"endTime"`
}

ScheduleSpec defines the desired state of Schedule.

func (*ScheduleSpec) Contains

func (s *ScheduleSpec) Contains(now time.Time) (bool, error)

func (*ScheduleSpec) DeepCopy

func (in *ScheduleSpec) DeepCopy() *ScheduleSpec

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

func (*ScheduleSpec) DeepCopyInto

func (in *ScheduleSpec) DeepCopyInto(out *ScheduleSpec)

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

func (ScheduleSpec) IsCompleted

func (s ScheduleSpec) IsCompleted(now time.Time) (bool, error)

type ScheduleStatus

type ScheduleStatus struct {

	// LastTransitionTime is the last time the condition transitioned from one status to another.
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Format=date-time
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime"`

	// Condition is schedule status type.
	// +optional
	Condition ScheduleConditionType `json:"condition,omitempty"`
}

ScheduleStatus defines the observed state of Schedule.

func (*ScheduleStatus) DeepCopy

func (in *ScheduleStatus) DeepCopy() *ScheduleStatus

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

func (*ScheduleStatus) DeepCopyInto

func (in *ScheduleStatus) DeepCopyInto(out *ScheduleStatus)

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

type ScheduleType

type ScheduleType string
const (
	Weekly  ScheduleType = "Weekly"
	Daily   ScheduleType = "Daily"
	OneShot ScheduleType = "OneShot"
)

type ScheduledPodAutoscaler

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

	Spec   ScheduledPodAutoscalerSpec   `json:"spec,omitempty"`
	Status ScheduledPodAutoscalerStatus `json:"status,omitempty"`
}

ScheduledPodAutoscaler is the Schema for the scheduledpodautoscalers API.

func (*ScheduledPodAutoscaler) DeepCopy

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

func (*ScheduledPodAutoscaler) DeepCopyInto

func (in *ScheduledPodAutoscaler) DeepCopyInto(out *ScheduledPodAutoscaler)

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

func (*ScheduledPodAutoscaler) DeepCopyObject

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

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

type ScheduledPodAutoscalerConditionType

type ScheduledPodAutoscalerConditionType string
const (
	ScheduledPodAutoscalerAvailable ScheduledPodAutoscalerConditionType = "Available"
	ScheduledPodAutoscalerDegraded  ScheduledPodAutoscalerConditionType = "Degraded"
)

type ScheduledPodAutoscalerList

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

ScheduledPodAutoscalerList contains a list of ScheduledPodAutoscaler.

func (*ScheduledPodAutoscalerList) DeepCopy

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

func (*ScheduledPodAutoscalerList) DeepCopyInto

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

func (*ScheduledPodAutoscalerList) DeepCopyObject

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

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

type ScheduledPodAutoscalerSpec

type ScheduledPodAutoscalerSpec struct {

	// HorizontalPodAutoscalerSpec is HorizontalPodAutoscaler v2beta2 API spec.
	// ref: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#horizontalpodautoscaler-v2beta2-autoscaling
	// +kubebuilder:validation:Required
	HorizontalPodAutoscalerSpec autoscalingv2beta2.HorizontalPodAutoscalerSpec `json:"horizontalPodAutoscalerSpec"`
}

ScheduledPodAutoscalerSpec defines the desired state of ScheduledPodAutoscaler.

func (*ScheduledPodAutoscalerSpec) DeepCopy

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

func (*ScheduledPodAutoscalerSpec) DeepCopyInto

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

type ScheduledPodAutoscalerStatus

type ScheduledPodAutoscalerStatus struct {

	// LastTransitionTime is the last time the condition transitioned from one status to another.
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Format=date-time
	// +optional
	LastTransitionTime metav1.Time `json:"lastTransitionTime"`

	// Condition is schedule status type.
	// +optional
	Condition ScheduledPodAutoscalerConditionType `json:"condition,omitempty"`
}

ScheduledPodAutoscalerStatus defines the observed state of ScheduledPodAutoscaler.

func (*ScheduledPodAutoscalerStatus) DeepCopy

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

func (*ScheduledPodAutoscalerStatus) DeepCopyInto

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