Skip to content

Commit 5935f90

Browse files
Refactor the BootstrapConfig contract
1 parent 187f385 commit 5935f90

File tree

7 files changed

+441
-128
lines changed

7 files changed

+441
-128
lines changed

docs/book/src/SUMMARY.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@
7777
- [MachineSet](./developer/core/controllers/machine-set.md)
7878
- [Machine](./developer/core/controllers/machine.md)
7979
- [MachinePool](./developer/core/controllers/machine-pool.md)
80-
- [MachineHealthCheck](./developer/core/controllers/machine-health-check.md)
81-
- [Bootstrap](./developer/core/controllers/bootstrap.md)
80+
- [MachineHealthCheck](./developer/core/controllers/machine-health-check.md)
8281
- [Control Plane](./developer/core/controllers/control-plane.md)
8382
- [Logging](developer/core/logging.md)
8483
- [Testing](developer/core/testing.md)

docs/book/src/developer/core/controllers/bootstrap.md

-16
This file was deleted.

docs/book/src/developer/core/controllers/machine.md

+13
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ a BootstrapConfig object, e.g. KubeadmBoostrapConfig etc.
2222
The [BootstrapConfig resource contract](../../providers/contracts/bootstrap-config.md) defines a set of rules a provider is expected to comply with in order to allow
2323
the expected interactions with the Machine controller.
2424

25+
Among those rules:
26+
- BootstrapConfig MUST create a [bootstrap data secret](../../providers/contracts/bootstrap-config.md#bootstrapconfig-data-secret) where machines should be placed in
27+
- BootstrapConfig MUST report when Machine's bootstrap data secret is [fully provisioned](../../providers/contracts/bootstrap-config.md#bootstrapconfig-initialization-completed)
28+
- BootstrapConfig SHOULD report [conditions](../../providers/contracts/bootstrap-config.md#bootstrapconfig-conditions)
29+
- BootstrapConfig SHOULD report [terminal failures](../../providers/contracts/bootstrap-config.md#bootstrapconfig-terminal-failures)
30+
- BootstrapConfig SHOULD report [taint Nodes at creation](../../providers/contracts/bootstrap-config.md#taint-nodes-at-creation)
31+
- BootstrapConfig SHOULD create a [sentinel file](../../providers/contracts/bootstrap-config.md#sentinel-file) on machines
32+
2533
Considering all the info above, the Machine controller's main responsibilities are:
2634

2735
* Setting an OwnerReference on the infrastructure object referenced in `Machine.spec.infrastructureRef`.
@@ -44,3 +52,8 @@ The machine controller uses the kubeconfig for the new workload cluster to watch
4452
When a node appears with `Node.Spec.ProviderID` matching `Machine.Spec.ProviderID`, the machine controller
4553
transitions the associated machine into the `Provisioned` state. When the infrastructure ref is also
4654
`Ready`, the machine controller marks the machine as `Running`.
55+
56+
The following schema goes trough machine phases and interactions with InfraMachine and BootstrapConfig
57+
happening at each step.
58+
59+
![](../../../images/machine-phases.png)

0 commit comments

Comments
 (0)