Skip to content

Commit 4dcc029

Browse files
committed
Add documentation for AutoScaleFromZero
Add documentation for the `AutoScaleFromZero` feature flag
1 parent d5880a7 commit 4dcc029

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

docs/book/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- [Configuration](clusteropenstack/configuration.md)
66
- [Experimental Features](./experimental-features/experimental-features.md)
77
- [PriorityQueue](./experimental-features/priority-queue.md)
8+
- [AutoScaleFromZero](./experimental-features/autoscale-from-zero.md)
89
- [Topics](./topics/index.md)
910
- [external cloud provider](./topics/external-cloud-provider.md)
1011
- [hosted control plane](./topics/hosted-control-plane.md)
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# AutoScale From Zero
2+
3+
> **Note:** AutoScaleFromZero is available in >= 0.14.
4+
5+
> **Note**: AutoScaleFromZero can be used only in clusters using the [ClusterClass](https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-class/) feature.
6+
7+
The `AutoScaleFromZero` feature flag enables the usage of [cluster-autoscaler](https://github.com/kubernetes/autoscaler/tree/bc3f44c85df17bccc940adb7c885b192cf6135d7/cluster-autoscaler/cloudprovider/clusterapi#cluster-autoscaler-on-cluster-api) to scale from/to zero without the need of annotations. More information on how to use the cluster-autoscaler can be found [here](https://github.com/kubernetes/autoscaler/tree/bc3f44c85df17bccc940adb7c885b192cf6135d7/cluster-autoscaler/cloudprovider/clusterapi#scale-from-zero-support).
8+
9+
## Enabling AutoScaleFromZero
10+
11+
You can enable `AutoScaleFromZero` using the following.
12+
13+
- Environment variable: `EXP_CAPO_AUTOSCALE_FROM_ZERO=true`
14+
- clusterctl.yaml variable: `EXP_CAPO_AUTOSCALE_FROM_ZERO: true`
15+
- --feature-gates argument: `AutoScaleFromZero=true`
16+
17+
## Automatically Populated Status Fields
18+
19+
> **Note**: Unsupported fields may be provided via annotations or incorporated into the controller by extending its functionality.
20+
21+
The controller automatically fills two sections of `OpenStackMachineTemplate.Status`:
22+
- **capacity** (resource quantities)
23+
- **nodeInfo** (OS metadata)
24+
25+
The following mappings describe exactly where each value originates.
26+
27+
### Capacity (`Status.Capacity`)
28+
- **CPU**: From the `VCPUs` property of the resolved OpenStack flavor
29+
30+
- **Memory**: From the `RAM` property of the resolved OpenStack flavor
31+
32+
- **Ephemeral Storage**: From the `Ephemeral` property of the resolved OpenStack flavor
33+
34+
- **Root Storage**: Determined based on the boot method:
35+
- If **booting from volume** taken from `OpenStackMachineTemplate.Spec.Template.Spec.RootVolume.SizeGiB`
36+
- If **booting from image** taken from the `Disk` property of the resolved OpenStack flavor
37+
38+
### Node Information (`Status.NodeInfo`)
39+
- **Operating System**: From the `os_type` property of the resolved OpenStack image.

docs/book/src/experimental-features/experimental-features.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CAPO now ships with experimental features the users can enable.
44

55
Currently CAPO has the following experimental features:
66
* `PriorityQueue` (env var: `EXP_CAPO_PRIORITY_QUEUE`): [PriorityQueue](./priority-queue.md)
7+
* `AutoScaleFromZero` (env var: `EXP_CAPO_AUTOSCALE_FROM_ZERO`): [AutoScaleFromZero](./autoscale-from-zero.md)
78

89
## Enabling Experimental Features for Management Clusters Started with clusterctl
910

0 commit comments

Comments
 (0)