Skip to content

Commit 080e74c

Browse files
authored
Merge pull request #26005 from yuandongx/patch-19
[zh] sync content/zh/docs/concepts/workloads/pods/pod-topology-spread-constraints.md
2 parents 7a91341 + 6eeb41f commit 080e74c

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

content/zh/docs/concepts/workloads/pods/pod-topology-spread-constraints.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ profiles:
499499
- maxSkew: 1
500500
topologyKey: topology.kubernetes.io/zone
501501
whenUnsatisfiable: ScheduleAnyway
502+
defaultingType: List
502503
```
503504

504505
{{< note >}}
@@ -520,15 +521,15 @@ using default constraints for `PodTopologySpread`.
520521
-->
521522
#### 内部默认约束 {#internal-default-constraints}
522523

523-
{{< feature-state for_k8s_version="v1.19" state="alpha" >}}
524+
{{< feature-state for_k8s_version="v1.20" state="beta" >}}
524525

525526
<!--
526-
When you enable the `DefaultPodTopologySpread` feature gate, the
527+
With the `DefaultPodTopologySpread` feature gate, enabled by default, the
527528
legacy `SelectorSpread` plugin is disabled.
528529
kube-scheduler uses the following default topology constraints for the
529530
`PodTopologySpread` plugin configuration:
530531
-->
531-
当你启用了 `DefaultPodTopologySpread` 特性门控时,原来的
532+
当你使用了默认启用的 `DefaultPodTopologySpread` 特性门控时,原来的
532533
`SelectorSpread` 插件会被禁用。
533534
kube-scheduler 会使用下面的默认拓扑约束作为 `PodTopologySpread` 插件的
534535
配置:
@@ -565,6 +566,26 @@ Kubernetes 的默认约束。
565566
插件 `PodTopologySpread` 不会为未设置分布约束中所给拓扑键的节点评分。
566567
{{< /note >}}
567568

569+
<!--
570+
If you don't want to use the default Pod spreading constraints for your cluster,
571+
you can disable those defaults by setting `defaultingType` to `List` and leaving
572+
empty `defaultConstraints` in the `PodTopologySpread` plugin configuration:
573+
-->
574+
如果你不想为集群使用默认的 Pod 分布约束,你可以通过设置 `defaultingType` 参数为 `List` 和
575+
将 `PodTopologySpread` 插件配置中的 `defaultConstraints` 参数置空来禁用默认 Pod 分布约束。
576+
577+
```yaml
578+
apiVersion: kubescheduler.config.k8s.io/v1beta1
579+
kind: KubeSchedulerConfiguration
580+
581+
profiles:
582+
- pluginConfig:
583+
- name: PodTopologySpread
584+
args:
585+
defaultConstraints: []
586+
defaultingType: List
587+
```
588+
568589
<!--
569590
## Comparison with PodAffinity/PodAntiAffinity
570591

0 commit comments

Comments
 (0)