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:
- kubecloudscaler.cloud/v1alpha3.FlowSpec
- kubecloudscaler.cloud/v1alpha3.GcpSpec
- kubecloudscaler.cloud/v1alpha3.K8sSpec
| Field | Description | Default | Validation |
|---|---|---|---|
type string | Enum: [down up] | ||
time common.TimePeriod | |||
minReplicas integer | Minimum replicas | ||
maxReplicas integer | Maximum replicas | ||
name string | Name of the period | Pattern: ^(|[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:
| Field | Description | Default | Validation |
|---|---|---|---|
recurring common.RecurringPeriod | |||
fixed common.FixedPeriod |
common.RecurringPeriod
RecurringPeriod defines a recurring time period for scaling operations.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
days string array | |||
startTime string | Pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ | ||
endTime string | Pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$ | ||
timezone string | |||
once boolean | Run once at StartTime | ||
gracePeriod string | Pattern: ^\d*s$ | ||
reverse boolean | Reverse the period |
common.FixedPeriod
FixedPeriod defines a fixed time period for scaling operations.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
startTime string | Pattern: ^\d\{4\}-(0?[1-9]|1[0,1,2])-(0?[1-9]|[12][0-9]|3[01]) | ||
endTime string | Pattern: ^\d\{4\}-(0?[1-9]|1[0,1,2])-(0?[1-9]|[12][0-9]|3[01]) | ||
timezone string | |||
once boolean | Run once at StartTime | ||
gracePeriod string | Grace period in seconds for deployments before scaling down | Pattern: ^\d*s$ | |
reverse boolean | Reverse the period |
common.ScalerStatus
ScalerStatus defines the observed state of Scaler.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
currentPeriod common.ScalerStatusPeriod | |||
comments string |
common.ScalerStatusPeriod
ScalerStatusPeriod defines the current period status for a scaler.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
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:
| Field | Description | Default | Validation |
|---|---|---|---|
kind string | |||
name string | |||
comment string |
common.ScalerStatusFailed
ScalerStatusFailed represents a failed scaling operation.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
kind string | |||
name string | |||
reason string |
common.Resources
Resources defines the configuration for managed resources.
Appears in:
- kubecloudscaler.cloud/v1alpha3.K8sResource
- kubecloudscaler.cloud/v1alpha3.GcpResource
- kubecloudscaler.cloud/v1alpha3.GcpSpec
- kubecloudscaler.cloud/v1alpha3.K8sSpec
| Field | Description | Default | Validation |
|---|---|---|---|
types string array | Types of resources K8s: deployments, statefulsets, … (default: deployments) GCP: VM-instances, … (default: vm-instances) | ||
names string array | Names of resources to manage | ||
labelSelector LabelSelector | Labels selectors |
kubecloudscaler.cloud/v1alpha3
Package v1alpha3 contains API Schema definitions for the kubecloudscaler v1alpha3 API group.
Resource Types
- kubecloudscaler.cloud/v1alpha3.Flow
- kubecloudscaler.cloud/v1alpha3.Gcp
- kubecloudscaler.cloud/v1alpha3.K8s
kubecloudscaler.cloud/v1alpha3.Flow
Flow is the Schema for the flows API
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string | kubecloudscaler.cloud/v1alpha3 | ||
kind string | Flow | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
spec kubecloudscaler.cloud/v1alpha3.FlowSpec | spec defines the desired state of Flow | ||
status kubecloudscaler.cloud/v1alpha3.FlowStatus | status defines the observed state of Flow |
kubecloudscaler.cloud/v1alpha3.Gcp
Gcp is the Schema for the gcps API
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string | kubecloudscaler.cloud/v1alpha3 | ||
kind string | Gcp | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
spec kubecloudscaler.cloud/v1alpha3.GcpSpec | spec defines the desired state of Gcp | ||
status common.ScalerStatus | status defines the observed state of Gcp |
kubecloudscaler.cloud/v1alpha3.K8s
K8s is the Schema for the k8s API
| Field | Description | Default | Validation |
|---|---|---|---|
apiVersion string | kubecloudscaler.cloud/v1alpha3 | ||
kind string | K8s | ||
metadata ObjectMeta | Refer to Kubernetes API documentation for fields of metadata. | ||
spec kubecloudscaler.cloud/v1alpha3.K8sSpec | spec defines the desired state of K8s | ||
status common.ScalerStatus | status defines the observed state of K8s |
kubecloudscaler.cloud/v1alpha3.FlowSpec
FlowSpec defines the desired state of Flow
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
periods common.ScalerPeriod array | Time period to scale | ||
resources kubecloudscaler.cloud/v1alpha3.Resources | Resources | ||
flows kubecloudscaler.cloud/v1alpha3.Flows array |
kubecloudscaler.cloud/v1alpha3.Resources
Resources defines the configuration for managed resources in a flow.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
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:
| Field | Description | Default | Validation |
|---|---|---|---|
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:
| Field | Description | Default | Validation |
|---|---|---|---|
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:
| Field | Description | Default | Validation |
|---|---|---|---|
periodName string | |||
resources kubecloudscaler.cloud/v1alpha3.FlowResource array |
kubecloudscaler.cloud/v1alpha3.FlowResource
FlowResource defines a resource within a flow.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
name string | |||
startTimeDelay string | StartTimeDelay 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 | 0m | Pattern: ^\d*m$ |
endTimeDelay string | 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 | 0m | Pattern: ^\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:
| Field | Description | Default | Validation |
|---|---|---|---|
conditions Condition array | conditions 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:
| Field | Description | Default | Validation |
|---|---|---|---|
dryRun boolean | dry-run mode | ||
periods common.ScalerPeriod array | Time period to scale | ||
resources common.Resources | Resources | ||
config kubecloudscaler.cloud/v1alpha3.GcpConfig |
kubecloudscaler.cloud/v1alpha3.GcpConfig
GcpConfig defines the configuration for GCP resource management.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
projectId string | ProjectID | ||
region string | Region | ||
authSecret string | AuthSecret name | ||
restoreOnDelete boolean | Restore resource state on CR deletion (default: true) | true | |
waitForOperation boolean | Wait for operation to complete | ||
defaultPeriodType string | Default status for resources | down | Enum: [down up] |
kubecloudscaler.cloud/v1alpha3.K8sSpec
K8sSpec defines the desired state of K8s
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
dryRun boolean | dry-run mode | ||
periods common.ScalerPeriod array | Time period to scale | ||
resources common.Resources | Resources | ||
config kubecloudscaler.cloud/v1alpha3.K8sConfig |
kubecloudscaler.cloud/v1alpha3.K8sConfig
K8sConfig defines the configuration for Kubernetes resource management.
Appears in:
| Field | Description | Default | Validation |
|---|---|---|---|
namespaces string array | Namespaces | ||
excludeNamespaces string array | Exclude namespaces from downscaling; will be ignored if Namespaces is set | ||
forceExcludeSystemNamespaces boolean | Force exclude system namespaces | true | |
deploymentTimeAnnotation string | Deployment time annotation | ||
disableEvents boolean | Disable events | ||
authSecret string | AuthSecret name | ||
restoreOnDelete boolean | Restore resource state on CR deletion (default: true) | true |