You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Label should meet one of the following criteria to propagate to Node:
66
+
Labels that meet at least one of the following criteria are always propagated to the Node:
67
67
- Has `node-role.kubernetes.io` as prefix.
68
68
- Belongs to `node-restriction.kubernetes.io` domain.
69
-
- Belongs to `node.cluster.x-k8s.io` domain.
69
+
- Belongs to `node.cluster.x-k8s.io` domain.
70
+
71
+
In addition, any labels that match at least one of the regexes provided by the `--additional-sync-machine-labels` flag on the manager will be synced from the Machine to the Node.
Copy file name to clipboardExpand all lines: docs/proposals/20220927-label-sync-between-machine-and-nodes.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,7 @@ With the "divide and conquer" principle in mind this proposal aims to address th
68
68
69
69
- Support label sync from Machine to the linked Kubernetes node, limited to `node-role.kubernetes.io/` prefix and the `node-restriction.kubernetes.io` domain.
70
70
- Support syncing labels from Machine to the linked Kubernetes node for the Cluster API owned `node.cluster.x-k8s.io` domain.
71
+
- Support a flag to sync additional user configured labels from the Machine to the Node.
71
72
72
73
### Non-Goals
73
74
@@ -98,7 +99,9 @@ While designing a solution for syncing labels between Machine and underlying Kub
98
99
99
100
### Label domains & prefixes
100
101
101
-
The idea of scoping synchronization to a well defined set of labels is a first answer to security/concurrency concerns; labels to be managed by Cluster API have been selected based on following criteria:
102
+
A default list of labels would always be synced from the Machines to the Nodes. An additional list of labels can be synced from the Machine to the Node by providing a list of regexes as a flag to the manager.
103
+
104
+
The following is the default list of label domains that would always be sync from Machines to Nodes:
102
105
103
106
- The `node-role.kubernetes.io` label has been used widely in the past to identify the role of a Kubernetes Node (e.g. `node-role.kubernetes.io/worker=''`). For example, `kubectl get node` looks for this specific label when displaying the role to the user.
104
107
@@ -163,3 +166,4 @@ Users could also implement their own label synchronizer in their tooling, but th
163
166
164
167
-[ ] 09/27/2022: First Draft of this document
165
168
-[ ] 09/28/2022: First Draft of this document presented in the Cluster API office hours meeting
169
+
-[ ] 01/09/2025: Update to support configurable label syncing Ref:[11657](https://github.com/kubernetes-sigs/cluster-api/issues/11657)
"List of regexes to select the additional set of labels to sync from the Machine to the Node. A label will be synced as long as it matches at least one of the regexes.")
setupLog.Error(fmt.Errorf("at least one of --additional-sync-machine-labels regexes is invalid: %w", kerrors.NewAggregate(errs)), "Unable to start manager")
0 commit comments