API Reference

Packages

kubecloudscaler.cloud/common

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

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

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

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]) ([0-1]?[0-9]|2[0-3]):[0-5]?[0-9]:[0-5]?[0-9]$
endTime stringPattern: ^\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]$
timezone string
once booleanRun once at StartTime
gracePeriod stringGrace period in seconds for deployments before scaling downPattern: ^\d*s$
reverse booleanReverse the period

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

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

ScalerPeriod

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

Appears in:

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

ScalerStatus

ScalerStatus defines the observed state of Scaler.

Appears in:

FieldDescriptionDefaultValidation
currentPeriod ScalerStatusPeriod
comments string

ScalerStatusFailed

ScalerStatusFailed represents a failed scaling operation.

Appears in:

FieldDescriptionDefaultValidation
kind string
name string
reason string

ScalerStatusPeriod

ScalerStatusPeriod defines the current period status for a scaler.

Appears in:

FieldDescriptionDefaultValidation
spec RecurringPeriod
specSHA string
type string
success ScalerStatusSuccess array
failed ScalerStatusFailed array

ScalerStatusSuccess

ScalerStatusSuccess represents a successful scaling operation.

Appears in:

FieldDescriptionDefaultValidation
kind string
name string
comment string

TimePeriod

TimePeriod defines the time configuration for a scaling period.

Appears in:

FieldDescriptionDefaultValidation
recurring RecurringPeriod
fixed FixedPeriod

kubecloudscaler.cloud/v1alpha3

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

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

Resource Types

Flow

Flow is the Schema for the flows API

Appears in:

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

FlowList

FlowList contains a list of Flow

FieldDescriptionDefaultValidation
apiVersion stringkubecloudscaler.cloud/v1alpha3
kind stringFlowList
metadata ListMetaRefer to Kubernetes API documentation for fields of metadata.
items Flow array

FlowResource

FlowResource defines a resource within a flow.

Appears in:

FieldDescriptionDefaultValidation
name string
delay stringDelay 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 period
Pattern: ^\d*m$

FlowSpec

FlowSpec defines the desired state of Flow

Appears in:

FieldDescriptionDefaultValidation
periods ScalerPeriod arrayTime period to scale
resources ResourcesResources
flows Flows array

FlowStatus

FlowStatus defines the observed state of Flow.

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.

Flows

Flows defines a flow configuration with period and resources.

Appears in:

FieldDescriptionDefaultValidation
periodName string
resources FlowResource array

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 GcpSpecspec defines the desired state of Gcp
status ScalerStatusstatus defines the observed state of Gcp

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]

GcpResource

GcpResource defines a GCP resource configuration in a flow.

Appears in:

FieldDescriptionDefaultValidation
name string
resources Resources
config GcpConfig

GcpSpec

GcpSpec defines the desired state of Gcp

Appears in:

FieldDescriptionDefaultValidation
dryRun booleandry-run mode
periods ScalerPeriod arrayTime period to scale
resources ResourcesResources
config GcpConfig

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 K8sSpecspec defines the desired state of K8s
status ScalerStatusstatus defines the observed state of K8s

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

K8sResource

K8sResource defines a Kubernetes resource configuration in a flow.

Appears in:

FieldDescriptionDefaultValidation
name string
resources Resources
config K8sConfig

K8sSpec

K8sSpec defines the desired state of K8s

Appears in:

FieldDescriptionDefaultValidation
dryRun booleandry-run mode
periods ScalerPeriod arrayTime period to scale
resources ResourcesResources
config K8sConfig

Resources

Resources defines the configuration for managed resources in a flow.

Appears in:

FieldDescriptionDefaultValidation
k8s K8sResource array
gcp GcpResource array