v1alpha1

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

+kubebuilder:object:generate=true

Package v1alpha1 contains API Schema definitions for the gcp v1alpha1 API group +groupName=cloudscaler.io

+kubebuilder:object:generate=true +groupName=cloudscaler.io

Index

Constants

This section is empty.

Variables

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

type FixedPeriod struct {
	// +kubebuilder:validation:Pattern=`^\d{4}-(0?[1-9]|1[0,1,2])-(0?[1-9]|[12][0-9]|3[01]) ([0-1]?[0-9]|2[0-3]):[0-5]?[0-9]:[0-5]?[0-9]$`
	StartTime string `json:"startTime"`
	// +kubebuilder:validation:Pattern=`^\d{4}-(0?[1-9]|1[0,1,2])-(0?[1-9]|[12][0-9]|3[01]) ([0-1]?[0-9]|2[0-3]):[0-5]?[0-9]:[0-5]?[0-9]$`
	EndTime  string  `json:"endTime"`
	Timezone *string `json:"timezone,omitempty"`
	// Run once at StartTime
	Once *bool `json:"once,omitempty"`
	// Grace period in seconds for deployments before scaling down
	// +kubebuilder:validation:Pattern=`^\d*s$`
	GracePeriod *string `json:"gracePeriod,omitempty"`
	// Reverse the period
	Reverse *bool `json:"reverse,omitempty"`
}

func (*FixedPeriod) DeepCopy

func (in *FixedPeriod) DeepCopy() *FixedPeriod

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

func (*FixedPeriod) DeepCopyInto

func (in *FixedPeriod) DeepCopyInto(out *FixedPeriod)

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

type Gcp

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

	Spec   GcpSpec      `json:"spec,omitempty"`
	Status ScalerStatus `json:"status,omitempty"`
}

Gcp is the Schema for the scalers API

func (*Gcp) DeepCopy

func (in *Gcp) DeepCopy() *Gcp

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

func (*Gcp) DeepCopyInto

func (in *Gcp) DeepCopyInto(out *Gcp)

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

func (*Gcp) DeepCopyObject

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

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

type GcpList

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

GcpList contains a list of Scaler

func (*GcpList) DeepCopy

func (in *GcpList) DeepCopy() *GcpList

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

func (*GcpList) DeepCopyInto

func (in *GcpList) DeepCopyInto(out *GcpList)

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

func (*GcpList) DeepCopyObject

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

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

type GcpSpec

type GcpSpec struct {

	// dry-run mode
	DryRun bool `json:"dryRun,omitempty"`

	// Time period to scale
	Periods []*ScalerPeriod `json:"periods"`
}

GcpSpec defines the desired state of Scaler

func (*GcpSpec) DeepCopy

func (in *GcpSpec) DeepCopy() *GcpSpec

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

func (*GcpSpec) DeepCopyInto

func (in *GcpSpec) DeepCopyInto(out *GcpSpec)

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

type K8s

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

	Spec   K8sSpec      `json:"spec,omitempty"`
	Status ScalerStatus `json:"status,omitempty"`
}

Scaler is the Schema for the scalers API

func (*K8s) DeepCopy

func (in *K8s) DeepCopy() *K8s

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

func (*K8s) DeepCopyInto

func (in *K8s) DeepCopyInto(out *K8s)

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

func (*K8s) DeepCopyObject

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

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

type K8sList

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

ScalerList contains a list of Scaler

func (*K8sList) DeepCopy

func (in *K8sList) DeepCopy() *K8sList

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

func (*K8sList) DeepCopyInto

func (in *K8sList) DeepCopyInto(out *K8sList)

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

func (*K8sList) DeepCopyObject

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

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

type K8sSpec

type K8sSpec struct {

	// dry-run mode
	DryRun bool `json:"dryRun,omitempty"`

	// Time period to scale
	Periods []*ScalerPeriod `json:"periods"`

	// Resources
	// Namespaces
	Namespaces []string `json:"namespaces,omitempty"`
	// Exclude namespaces from downscaling
	ExcludeNamespaces []string `json:"excludeNamespaces,omitempty"`
	// Resources
	Resources []string `json:"resources,omitempty"`
	// Exclude resources from downscaling
	ExcludeResources []string `json:"excludeResources,omitempty"`
	// Labels selectors
	LabelSelector *metav1.LabelSelector `json:"labelSelector,omitempty"`
	// Deployment time annotation
	DeploymentTimeAnnotation string `json:"deploymentTimeAnnotation,omitempty"`
	// Disable events
	DisableEvents bool `json:"disableEvents,omitempty"`
}

ScalerSpec defines the desired state of Scaler

func (*K8sSpec) DeepCopy

func (in *K8sSpec) DeepCopy() *K8sSpec

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

func (*K8sSpec) DeepCopyInto

func (in *K8sSpec) DeepCopyInto(out *K8sSpec)

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

type RecurringPeriod

type RecurringPeriod struct {
	Days []string `json:"days"`
	// +kubebuilder:validation:Pattern=`^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$`
	StartTime string `json:"startTime"`
	// +kubebuilder:validation:Pattern=`^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$`
	EndTime  string  `json:"endTime"`
	Timezone *string `json:"timezone,omitempty"`
	// Run once at StartTime
	Once *bool `json:"once,omitempty"`
	// +kubebuilder:validation:Pattern=`^\d*s$`
	GracePeriod *string `json:"gracePeriod,omitempty"`
	// Reverse the period
	Reverse *bool `json:"reverse,omitempty"`
}

func (*RecurringPeriod) DeepCopy

func (in *RecurringPeriod) DeepCopy() *RecurringPeriod

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

func (*RecurringPeriod) DeepCopyInto

func (in *RecurringPeriod) DeepCopyInto(out *RecurringPeriod)

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

type ScalerPeriod

type ScalerPeriod struct {
	// +kubebuilder:validation:Enum=down;nominal;up;restore
	Type string     `json:"type"`
	Time TimePeriod `json:"time"`
	// Minimum replicas
	MinReplicas *int32 `json:"minReplicas,omitempty"`
	// Maximum replicas
	MaxReplicas *int32 `json:"maxReplicas,omitempty"`
}

func (*ScalerPeriod) DeepCopy

func (in *ScalerPeriod) DeepCopy() *ScalerPeriod

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

func (*ScalerPeriod) DeepCopyInto

func (in *ScalerPeriod) DeepCopyInto(out *ScalerPeriod)

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

type ScalerStatus

type ScalerStatus struct {
	CurrentPeriod *ScalerStatusPeriod `json:"currentPeriod,omitempty"`
	Comments      *string             `json:"comments,omitempty"`
}

ScalerStatus defines the observed state of Scaler

func (*ScalerStatus) DeepCopy

func (in *ScalerStatus) DeepCopy() *ScalerStatus

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

func (*ScalerStatus) DeepCopyInto

func (in *ScalerStatus) DeepCopyInto(out *ScalerStatus)

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

type ScalerStatusFailed

type ScalerStatusFailed struct {
	Kind   string `json:"kind"`
	Name   string `json:"name"`
	Reason string `json:"reason"`
}

func (*ScalerStatusFailed) DeepCopy

func (in *ScalerStatusFailed) DeepCopy() *ScalerStatusFailed

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

func (*ScalerStatusFailed) DeepCopyInto

func (in *ScalerStatusFailed) DeepCopyInto(out *ScalerStatusFailed)

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

type ScalerStatusPeriod

type ScalerStatusPeriod struct {
	Spec       *RecurringPeriod      `json:"spec"`
	SpecSHA    string                `json:"specSHA"`
	Successful []ScalerStatusSuccess `json:"success,omitempty"`
	Failed     []ScalerStatusFailed  `json:"failed,omitempty"`
}

func (*ScalerStatusPeriod) DeepCopy

func (in *ScalerStatusPeriod) DeepCopy() *ScalerStatusPeriod

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

func (*ScalerStatusPeriod) DeepCopyInto

func (in *ScalerStatusPeriod) DeepCopyInto(out *ScalerStatusPeriod)

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

type ScalerStatusSuccess

type ScalerStatusSuccess struct {
	Kind string `json:"kind"`
	Name string `json:"name"`
}

func (*ScalerStatusSuccess) DeepCopy

func (in *ScalerStatusSuccess) DeepCopy() *ScalerStatusSuccess

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

func (*ScalerStatusSuccess) DeepCopyInto

func (in *ScalerStatusSuccess) DeepCopyInto(out *ScalerStatusSuccess)

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

type TimePeriod

type TimePeriod struct {
	Recurring *RecurringPeriod `json:"recurring,omitempty"`
	Fixed     *FixedPeriod     `json:"fixed,omitempty"`
}

func (*TimePeriod) DeepCopy

func (in *TimePeriod) DeepCopy() *TimePeriod

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

func (*TimePeriod) DeepCopyInto

func (in *TimePeriod) DeepCopyInto(out *TimePeriod)

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