Skip to content

Commit e23e476

Browse files
committed
Update gitbook
Signed-off-by: Vince Prignano <[email protected]>
1 parent f412e47 commit e23e476

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

docs/book/common_code/machine_controller.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,22 @@ the host with a new one matching the updated spec. If a `Machine` object is
1010
deleted, the corresponding `Node` should have its external resources released by
1111
the provider-specific controller, and should be deleted as well.
1212

13+
Machines can be associated with a Cluster using a custom label
14+
`cluster.k8s.io/clusterName`. When the label is set and non-empty,
15+
then it must reference the name of a cluster residing in the same namespace.
16+
The label must be set only once and updates are not permitted,
17+
an admission controller is going to enforce the change in a future version.
18+
1319
{% method %}
1420
## Machine
1521

1622
`Machine` has 4 fields:
1723

18-
`Spec` contains the desired cluster state specified by the object. While much
24+
`Spec` contains the desired machine state specified by the object. While much
1925
of the `Spec` is defined by users, unspecified parts may be filled in with
2026
defaults or by Controllers such as autoscalers.
2127

22-
`Status` contains only observed cluster state and is only written by
28+
`Status` contains only observed machine state and is only written by
2329
controllers. `Status` is not the source of truth for any information, but
2430
instead aggregates and publishes observed state.
2531

@@ -93,7 +99,7 @@ methods.
9399
`Delete()` will only be called when the `Machine` is in the process of being
94100
deleted.
95101

96-
The definition of `Exist()` is determined by the provider.
102+
The definition of `Exists()` is determined by the provider.
97103

98104
**TODO**: Provide more guidance on `Exists()`.
99105

@@ -108,7 +114,7 @@ We need a diagram tracing the logic from resource creation through updates
108114
and finally deletion.
109115
{% endpanel %}
110116

111-
0. Determine the `Cluster` associated with the `Machine`.
117+
0. Determine the `Cluster` associated with the `Machine` from its `cluster.k8s.io/clusterName` label.
112118
- If the `Machine` hasn't been deleted and doesn't have a finalizer, add one.
113119
- If the `Machine` is being deleted, and there is no finalizer, we're done
114120
- Check if the `Machine` is allowed to be deleted. [^1]

0 commit comments

Comments
 (0)