Skip to content

Commit dda8b12

Browse files
authored
Merge pull request #13297 from fabriziopandini/document-in-place-contract
📖 Document in place contract
2 parents e2d3ffc + e402c4d commit dda8b12

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

docs/book/src/developer/providers/contracts/bootstrap-config.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ repo or add an item to the agenda in the [Cluster API community meeting](https:/
5353
| [BootstrapConfig: initialization completed] | Yes | |
5454
| [BootstrapConfig: conditions] | No | |
5555
| [BootstrapConfig: terminal failures] | No | |
56+
| [BootstrapConfig: support for in-place changes] | No | |
5657
| [BootstrapConfigTemplate, BootstrapConfigTemplateList resource definition] | Yes | |
5758
| [BootstrapConfigTemplate: support for SSA dry run] | No | Mandatory for ClusterClasses support |
5859
| [Sentinel file] | No | |
@@ -354,6 +355,22 @@ fields in the BootstrapConfig resource will be ignored and Machine's `status.dep
354355

355356
</aside>
356357

358+
### BootstrapConfig: support for in-place changes
359+
360+
In case you are developing an bootstrap config provider with support for in-place updates of the Machine configuration,
361+
you should consider following recommendations during implementation.
362+
363+
- The `Update Extension` is the component responsible for orchestrating in-place changes on Machines.
364+
Accordingly, the BootstrapConfig controller should ignore in-place changes and do not re-generate the bootstrap config.
365+
- It might be useful to start thinking about the BootstrapConfig API surface as a set of fields with one of the following behaviors:
366+
- "Immutable" fields that can only be changed by performing a rollout.
367+
- "Mutable" fields that will be “reconciled” by the `Update Extension`.
368+
- The validation webhook for the BootstrapConfig CR should allow changes to "mutable" fields; in case a bootstrap config provider
369+
wants to allow this change selectively, e.g. only when applied by core CAPI, please reach out to maintainers to discuss options.
370+
- Please note that the above field classification do not apply to the BootstrapConfigTemplate object.
371+
372+
See [Proposal](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240807-in-place-updates.md).
373+
357374
### BootstrapConfigTemplate, BootstrapConfigTemplateList resource definition
358375

359376
For a given BootstrapConfig resource, you MUST also add a corresponding BootstrapConfigTemplate resources in order to use it

docs/book/src/developer/providers/contracts/infra-machine.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ repo or add an item to the agenda in the [Cluster API community meeting](https:/
5555
| [InfraMachine: initialization completed] | Yes | |
5656
| [InfraMachine: conditions] | No | |
5757
| [InfraMachine: terminal failures] | No | |
58+
| [InfraMachine: support for in-place changes] | No | |
5859
| [InfraMachineTemplate, InfraMachineTemplateList resource definition] | Yes | |
5960
| [InfraMachineTemplate: support for SSA dry run] | No | Mandatory for ClusterClasses support |
6061
| [Multi tenancy] | No | Mandatory for clusterctl CLI support |
@@ -414,6 +415,24 @@ fields in the InfraMachine resource will be ignored and Machine's `status.deprec
414415

415416
</aside>
416417

418+
### InfraMachine: support for in-place changes
419+
420+
In case you are developing an infrastructure provider with support for in-place updates of the Machine infrastructure,
421+
you should consider following recommendations during implementation.
422+
423+
- The `Update Extension` is the component responsible for orchestrating in-place changes on Machines.
424+
Accordingly, the InfraMachine controller should ignore in-place changes. As alternative the InfraMachine controller
425+
must orchestrate those changes with the `Update Extension` (e.g. the `Update Extension` must report change progress).
426+
- It might be useful to start thinking about the InfraMachine API surface as a set of fields with one of the following behaviors:
427+
- "Immutable" fields that can only be changed by performing a rollout.
428+
- "Mutable" fields that will be “reconciled” by the `Update Extension`.
429+
- Fields written back to spec by the infra provider (e.g. ProviderID).
430+
- The validation webhook for the InfraMachine CR should allow changes to "mutable" fields; in case an infra provider
431+
wants to allow this change selectively, e.g. only when applied by core CAPI, please reach out to maintainers to discuss options.
432+
- Please note that the above field classification do not apply to the InfraMachineTemplate object.
433+
434+
See [Proposal](https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240807-in-place-updates.md).
435+
417436
### InfraMachineTemplate, InfraMachineTemplateList resource definition
418437

419438
For a given InfraMachine resource, you MUST also add a corresponding InfraMachineTemplate resources in order to use it

0 commit comments

Comments
 (0)