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
@@ -223,40 +223,54 @@ your cluster. Those fields are:
223
223
224
224
<!--
225
225
- **matchLabelKeys** is a list of pod label keys to select the pods over which
226
-
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`.
227
-
228
-
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.
226
+
spreading will be calculated. The keys are used to lookup values from the pod labels,
227
+
those key-value labels are ANDed with `labelSelector` to select the group of existing
228
+
pods over which spreading will be calculated for the incoming pod. The same key is
229
+
forbidden to exist in both `matchLabelKeys` and `labelSelector`. `matchLabelKeys` cannot
230
+
be set when `labelSelector` isn't set. Keys that don't exist in the pod labels will be
231
+
ignored. A null or empty list means only match against the `labelSelector`.
232
+
233
+
With `matchLabelKeys`, you don't need to update the `pod.spec` between different revisions.
234
+
The controller/operator just needs to set different values to the same label key for different
235
+
revisions. The scheduler will assume the values automatically based on `matchLabelKeys`. For
236
+
example, if you are configuring a Deployment, you can use the label keyed with
237
+
[pod-template-hash](/docs/concepts/workloads/controllers/deployment/#pod-template-hash-label), which
238
+
is added automatically by the Deployment controller, to distinguish between different revisions
239
+
in a single Deployment.
229
240
-->
230
241
-**matchLabelKeys** 是一个 Pod 标签键的列表,用于选择需要计算分布方式的 Pod 集合。
231
242
这些键用于从 Pod 标签中查找值,这些键值标签与 `labelSelector` 进行逻辑与运算,以选择一组已有的 Pod,
232
-
通过这些 Pod 计算新来 Pod 的分布方式。Pod 标签中不存在的键将被忽略。
243
+
通过这些 Pod 计算新来 Pod 的分布方式。`matchLabelKeys` 和 `labelSelector` 中禁止存在相同的键。
0 commit comments