Skip to content

Commit bf6bc41

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

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

docs/book/common_code/machine_controller.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,21 @@ 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`. Providers using the `Cluster` controller must
15+
provide the label which references the name of a cluster living in the same
16+
namespace.
17+
1318
{% method %}
1419
## Machine
1520

1621
`Machine` has 4 fields:
1722

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

22-
`Status` contains only observed cluster state and is only written by
27+
`Status` contains only observed machine state and is only written by
2328
controllers. `Status` is not the source of truth for any information, but
2429
instead aggregates and publishes observed state.
2530

@@ -93,7 +98,7 @@ methods.
9398
`Delete()` will only be called when the `Machine` is in the process of being
9499
deleted.
95100

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

98103
**TODO**: Provide more guidance on `Exists()`.
99104

@@ -108,7 +113,7 @@ We need a diagram tracing the logic from resource creation through updates
108113
and finally deletion.
109114
{% endpanel %}
110115

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

0 commit comments

Comments
 (0)