API Reference

Packages

common

Package common contains shared API Schema definitions for the kubecloudscaler project.

common.ScalerPeriod

ScalerPeriod defines a scaling period with time constraints and replica limits.

Appears in:

FieldDescriptionDefaultValidation
type stringEnum: [down up]
time common.TimePeriod
minReplicas integerMinimum replicas
maxReplicas integerMaximum replicas
name stringName of the periodPattern: ^(|[a-zA-Z0-9][a-zA-Z0-9_-]*)$

common.TimePeriod

TimePeriod defines the time configuration for a scaling period. Name of the period

Appears in:

FieldDescriptionDefaultValidation
recurring common.RecurringPeriod
fixed common.FixedPeriod

common.RecurringPeriod

RecurringPeriod defines a recurring time period for scaling operations.

Appears in:

FieldDescriptionDefaultValidation
days string array
startTime stringPattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$
endTime stringPattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$
timezone string
once booleanRun once at StartTime
gracePeriod stringPattern: ^\d*s$
reverse booleanReverse the period

common.FixedPeriod

FixedPeriod defines a fixed time period for scaling operations.

Appears in:

FieldDescriptionDefaultValidation
startTime stringPattern: ^\d\{4\}-(0?[1-9]|1[0,1,2])-(0?[1-9]|[12][0-9]|3[01])
endTime stringPattern: ^\d\{4\}-(0?[1-9]|1[0,1,2])-(0?[1-9]|[12][0-9]|3[01])
timezone string
once booleanRun once at StartTime
gracePeriod stringGrace period in seconds for deployments before scaling downPattern: ^\d*s$
reverse booleanReverse the period

common.ScalerStatus

ScalerStatus defines the observed state of Scaler.

Appears in:

FieldDescriptionDefaultValidation
currentPeriod common.ScalerStatusPeriod
comments string

common.ScalerStatusPeriod

ScalerStatusPeriod defines the current period status for a scaler.

Appears in:

FieldDescriptionDefaultValidation
spec common.RecurringPeriod
specSHA string
name string
type string
success common.ScalerStatusSuccess array
failed common.ScalerStatusFailed array

common.ScalerStatusSuccess

ScalerStatusSuccess represents a successful scaling operation.

Appears in:

FieldDescriptionDefaultValidation
kind string
name string
comment string

common.ScalerStatusFailed

ScalerStatusFailed represents a failed scaling operation.

Appears in:

FieldDescriptionDefaultValidation
kind string
name string
reason string

common.Resources

Resources defines the configuration for managed resources.

Appears in:

FieldDescriptionDefaultValidation
types string arrayTypes of resources K8s: deployments, statefulsets, … (default: deployments) GCP: VM-instances, … (default: vm-instances)
names string arrayNames of resources to manage
labelSelector LabelSelectorLabels selectors

kubecloudscaler.cloud/v1alpha3

Package v1alpha3 contains API Schema definitions for the kubecloudscaler v1alpha3 API group.

Resource Types

kubecloudscaler.cloud/v1alpha3.Flow

Flow is the Schema for the flows API

FieldDescriptionDefaultValidation
apiVersion stringkubecloudscaler.cloud/v1alpha3
kind stringFlow
metadata ObjectMetaRefer to Kubernetes API documentation for fields of metadata.
spec kubecloudscaler.cloud/v1alpha3.FlowSpecspec defines the desired state of Flow
status kubecloudscaler.cloud/v1alpha3.FlowStatusstatus defines the observed state of Flow

kubecloudscaler.cloud/v1alpha3.Gcp

Gcp is the Schema for the gcps API

FieldDescriptionDefaultValidation
apiVersion stringkubecloudscaler.cloud/v1alpha3
kind stringGcp
metadata ObjectMetaRefer to Kubernetes API documentation for fields of metadata.
spec kubecloudscaler.cloud/v1alpha3.GcpSpecspec defines the desired state of Gcp
status common.ScalerStatusstatus defines the observed state of Gcp

kubecloudscaler.cloud/v1alpha3.K8s

K8s is the Schema for the k8s API

FieldDescriptionDefaultValidation
apiVersion stringkubecloudscaler.cloud/v1alpha3
kind stringK8s
metadata ObjectMetaRefer to Kubernetes API documentation for fields of metadata.
spec kubecloudscaler.cloud/v1alpha3.K8sSpecspec defines the desired state of K8s
status common.ScalerStatusstatus defines the observed state of K8s

kubecloudscaler.cloud/v1alpha3.FlowSpec

FlowSpec defines the desired state of Flow

Appears in:

FieldDescriptionDefaultValidation
periods common.ScalerPeriod arrayTime period to scale
resources kubecloudscaler.cloud/v1alpha3.ResourcesResources
flows kubecloudscaler.cloud/v1alpha3.Flows array

kubecloudscaler.cloud/v1alpha3.Resources

Resources defines the configuration for managed resources in a flow.

Appears in:

FieldDescriptionDefaultValidation
k8s kubecloudscaler.cloud/v1alpha3.K8sResource array
gcp kubecloudscaler.cloud/v1alpha3.GcpResource array

kubecloudscaler.cloud/v1alpha3.K8sResource

K8sResource defines a Kubernetes resource configuration in a flow.

Appears in:

FieldDescriptionDefaultValidation
name string
resources common.Resources
config kubecloudscaler.cloud/v1alpha3.K8sConfig

kubecloudscaler.cloud/v1alpha3.GcpResource

GcpResource defines a GCP resource configuration in a flow.

Appears in:

FieldDescriptionDefaultValidation
name string
resources common.Resources
config kubecloudscaler.cloud/v1alpha3.GcpConfig

kubecloudscaler.cloud/v1alpha3.Flows

Flows defines a flow configuration with period and resources.

Appears in:

FieldDescriptionDefaultValidation
periodName string
resources kubecloudscaler.cloud/v1alpha3.FlowResource array

kubecloudscaler.cloud/v1alpha3.FlowResource

FlowResource defines a resource within a flow.

Appears in:

FieldDescriptionDefaultValidation
name string
startTimeDelay stringStartTimeDelay is the duration to delay the start of the period It is a duration in minutes It is optional and if not provided, the period will start at the start time of the period0mPattern: ^\d*m$
endTimeDelay stringEndTimeDelay is the duration to delay the end of the period It is a duration in minutes It is optional and if not provided, the period will end at the end time of the period0mPattern: ^\d*m$

kubecloudscaler.cloud/v1alpha3.FlowStatus

FlowStatus defines the observed state of Flow. EndTimeDelay is the duration to delay the end of the period It is a duration in minutes It is optional and if not provided, the period will end at the end time of the period

Appears in:

FieldDescriptionDefaultValidation
conditions Condition arrayconditions represent the current state of the Flow resource. Each condition has a unique type and reflects the status of a specific aspect of the resource. Standard condition types include: - “Available”: the resource is fully functional - “Progressing”: the resource is being created or updated - “Degraded”: the resource failed to reach or maintain its desired state The status of each condition is one of True, False, or Unknown.

kubecloudscaler.cloud/v1alpha3.GcpSpec

GcpSpec defines the desired state of Gcp

Appears in:

FieldDescriptionDefaultValidation
dryRun booleandry-run mode
periods common.ScalerPeriod arrayTime period to scale
resources common.ResourcesResources
config kubecloudscaler.cloud/v1alpha3.GcpConfig

kubecloudscaler.cloud/v1alpha3.GcpConfig

GcpConfig defines the configuration for GCP resource management.

Appears in:

FieldDescriptionDefaultValidation
projectId stringProjectID
region stringRegion
authSecret stringAuthSecret name
restoreOnDelete booleanRestore resource state on CR deletion (default: true)true
waitForOperation booleanWait for operation to complete
defaultPeriodType stringDefault status for resourcesdownEnum: [down up]

kubecloudscaler.cloud/v1alpha3.K8sSpec

K8sSpec defines the desired state of K8s

Appears in:

FieldDescriptionDefaultValidation
dryRun booleandry-run mode
periods common.ScalerPeriod arrayTime period to scale
resources common.ResourcesResources
config kubecloudscaler.cloud/v1alpha3.K8sConfig

kubecloudscaler.cloud/v1alpha3.K8sConfig

K8sConfig defines the configuration for Kubernetes resource management.

Appears in:

FieldDescriptionDefaultValidation
namespaces string arrayNamespaces
excludeNamespaces string arrayExclude namespaces from downscaling; will be ignored if Namespaces is set
forceExcludeSystemNamespaces booleanForce exclude system namespacestrue
deploymentTimeAnnotation stringDeployment time annotation
disableEvents booleanDisable events
authSecret stringAuthSecret name
restoreOnDelete booleanRestore resource state on CR deletion (default: true)true