You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/book/src/developer/providers/contracts/infra-machine.md
+42-1Lines changed: 42 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,7 @@ repo or add an item to the agenda in the [Cluster API community meeting](https:/
60
60
|[Multi tenancy]| No | Mandatory for clusterctl CLI support |
61
61
|[Clusterctl support]| No | Mandatory for clusterctl CLI support |
62
62
|[InfraMachine: pausing]| No ||
63
+
|[InfraMachineTemplate: support cluster autoscaling from zero]| No ||
63
64
64
65
Note:
65
66
-`All resources` refers to all the provider's resources "core" Cluster API interacts with;
@@ -491,6 +492,44 @@ Providers SHOULD implement the pause behaviour for every object with a reconcili
491
492
492
493
If implementing the pause behavior, providers SHOULD surface the paused status of an object using the Paused condition: `Status.Conditions[Paused]`.
493
494
495
+
### InfraMachineTemplate: support cluster autoscaling from zero
496
+
497
+
As described in the enhancement [Opt-in Autoscaling from Zero][Opt-in Autoscaling from Zero], providers may implement a capacity field in machine templates to inform the cluster autoscaler about the resources available on that machine type.
498
+
499
+
Building on the `FooMachineTemplate` example from above, this shows the addition of a status and capacity field:
500
+
501
+
```
502
+
import corev1 "k8s.io/api/core/v1"
503
+
504
+
// FooMachineTemplate is the Schema for the foomachinetemplates API.
When rendered to a manifest, the machine template status capacity field representing an instance with 500 megabytes of RAM, 1 CPU core, and 1 NVidia GPU would look like this:
524
+
525
+
```
526
+
status:
527
+
capacity:
528
+
memory: 500mb
529
+
cpu: "1"
530
+
nvidia.com/gpu: "1"
531
+
```
532
+
494
533
## Typical InfraMachine reconciliation workflow
495
534
496
535
A machine infrastructure provider must respond to changes to its InfraMachine resources. This process is
@@ -556,5 +595,7 @@ is implemented in InfraMachine controllers:
[Cluster API v1.11 migration notes]: ../migrations/v1.10-to-v1.11.md
599
+
[Opt-in Autoscaling from Zero]: https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20210310-opt-in-autoscaling-from-zero.md
600
+
[InfraMachine: pausing]: #inframachine-pausing
601
+
[InfraMachineTemplate: support cluster autoscaling from zero]: #inframachinetemplate-support-cluster-autoscaling-from-zero
0 commit comments