@@ -10,16 +10,22 @@ the host with a new one matching the updated spec. If a `Machine` object is
10
10
deleted, the corresponding ` Node ` should have its external resources released by
11
11
the provider-specific controller, and should be deleted as well.
12
12
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
+
13
19
{% method %}
14
20
## Machine
15
21
16
22
` Machine ` has 4 fields:
17
23
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
19
25
of the ` Spec ` is defined by users, unspecified parts may be filled in with
20
26
defaults or by Controllers such as autoscalers.
21
27
22
- ` Status ` contains only observed cluster state and is only written by
28
+ ` Status ` contains only observed machine state and is only written by
23
29
controllers. ` Status ` is not the source of truth for any information, but
24
30
instead aggregates and publishes observed state.
25
31
@@ -93,7 +99,7 @@ methods.
93
99
` Delete() ` will only be called when the ` Machine ` is in the process of being
94
100
deleted.
95
101
96
- The definition of ` Exist ()` is determined by the provider.
102
+ The definition of ` Exists ()` is determined by the provider.
97
103
98
104
** TODO** : Provide more guidance on ` Exists() ` .
99
105
@@ -108,7 +114,7 @@ We need a diagram tracing the logic from resource creation through updates
108
114
and finally deletion.
109
115
{% endpanel %}
110
116
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 .
112
118
- If the ` Machine ` hasn't been deleted and doesn't have a finalizer, add one.
113
119
- If the ` Machine ` is being deleted, and there is no finalizer, we're done
114
120
- Check if the ` Machine ` is allowed to be deleted. [ ^ 1 ]
0 commit comments