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
Copy file name to clipboardExpand all lines: content/en/docs/concepts/scheduling-eviction/topology-spread-constraints.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,17 +129,30 @@ your cluster. Those fields are:
129
129
for more details.
130
130
131
131
-**matchLabelKeys** is a list of pod label keys to select the pods over which
132
-
spreading will be calculated. The keys are used to lookup values from the pod labels, those key-value labels are ANDed with `labelSelector` to select the group of existing pods over which spreading will be calculated for the incoming pod. Keys that don't exist in the pod labels will be ignored. A null or empty list means only match against the `labelSelector`.
133
-
134
-
With `matchLabelKeys`, users don't need to update the `pod.spec` between different revisions. The controller/operator just needs to set different values to the same `label` key for different revisions. The scheduler will assume the values automatically based on `matchLabelKeys`. For example, if users use Deployment, they can use the label keyed with `pod-template-hash`, which is added automatically by the Deployment controller, to distinguish between different revisions in a single Deployment.
132
+
spreading will be calculated. The keys are used to lookup values from the pod labels,
133
+
those key-value labels are ANDed with `labelSelector` to select the group of existing
134
+
pods over which spreading will be calculated for the incoming pod. The same key is
135
+
forbidden to exist in both `matchLabelKeys` and `labelSelector`. `matchLabelKeys` cannot
136
+
be set when `labelSelector` isn't set. Keys that don't exist in the pod labels will be
137
+
ignored. A null or empty list means only match against the `labelSelector`.
138
+
139
+
With `matchLabelKeys`, you don't need to update the `pod.spec` between different revisions.
140
+
The controller/operator just needs to set different values to the same label key for different
141
+
revisions. The scheduler will assume the values automatically based on `matchLabelKeys`. For
142
+
example, if you are configuring a Deployment, you can use the label keyed with
143
+
[pod-template-hash](/docs/concepts/workloads/controllers/deployment/#pod-template-hash-label), which
144
+
is added automatically by the Deployment controller, to distinguish between different revisions
0 commit comments