Graduate default pod topology spread to beta

pull/24852/head
Aldo Culquicondor 2020-11-02 11:03:47 -05:00
parent fd242da719
commit ac3d7d5642
2 changed files with 21 additions and 5 deletions

View File

@ -284,8 +284,6 @@ There are some implicit conventions worth noting here:
### Cluster-level default constraints ### Cluster-level default constraints
{{< feature-state for_k8s_version="v1.19" state="beta" >}}
It is possible to set default topology spread constraints for a cluster. Default It is possible to set default topology spread constraints for a cluster. Default
topology spread constraints are applied to a Pod if, and only if: topology spread constraints are applied to a Pod if, and only if:
@ -312,6 +310,7 @@ profiles:
- maxSkew: 1 - maxSkew: 1
topologyKey: topology.kubernetes.io/zone topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: ScheduleAnyway whenUnsatisfiable: ScheduleAnyway
defaultingType: List
``` ```
{{< note >}} {{< note >}}
@ -324,9 +323,9 @@ using default constraints for `PodTopologySpread`.
#### Internal default constraints #### Internal default constraints
{{< feature-state for_k8s_version="v1.19" state="alpha" >}} {{< feature-state for_k8s_version="v1.20" state="beta" >}}
When you enable the `DefaultPodTopologySpread` feature gate, the With the `DefaultPodTopologySpread` feature gate, enabled by default, the
legacy `SelectorSpread` plugin is disabled. legacy `SelectorSpread` plugin is disabled.
kube-scheduler uses the following default topology constraints for the kube-scheduler uses the following default topology constraints for the
`PodTopologySpread` plugin configuration: `PodTopologySpread` plugin configuration:
@ -353,6 +352,22 @@ The `PodTopologySpread` plugin does not score the nodes that don't have
the topology keys specified in the spreading constraints. the topology keys specified in the spreading constraints.
{{< /note >}} {{< /note >}}
If you don't want to use the default Pod spreading constraints for your cluster,
you can disable those defaults by setting `defaultingType` to `List` and leaving
empty `defaultConstraints` in the `PodTopologySpread` plugin configuration:
```yaml
apiVersion: kubescheduler.config.k8s.io/v1beta1
kind: KubeSchedulerConfiguration
profiles:
- pluginConfig:
- name: PodTopologySpread
args:
defaultConstraints: []
defaultingType: List
```
## Comparison with PodAffinity/PodAntiAffinity ## Comparison with PodAffinity/PodAntiAffinity
In Kubernetes, directives related to "Affinity" control how Pods are In Kubernetes, directives related to "Affinity" control how Pods are

View File

@ -85,7 +85,8 @@ different Kubernetes components.
| `CustomCPUCFSQuotaPeriod` | `false` | Alpha | 1.12 | | | `CustomCPUCFSQuotaPeriod` | `false` | Alpha | 1.12 | |
| `CustomResourceDefaulting` | `false` | Alpha| 1.15 | 1.15 | | `CustomResourceDefaulting` | `false` | Alpha| 1.15 | 1.15 |
| `CustomResourceDefaulting` | `true` | Beta | 1.16 | | | `CustomResourceDefaulting` | `true` | Beta | 1.16 | |
| `DefaultPodTopologySpread` | `false` | Alpha | 1.19 | | | `DefaultPodTopologySpread` | `false` | Alpha | 1.19 | 1.19 |
| `DefaultPodTopologySpread` | `true` | Beta | 1.20 | |
| `DevicePlugins` | `false` | Alpha | 1.8 | 1.9 | | `DevicePlugins` | `false` | Alpha | 1.8 | 1.9 |
| `DevicePlugins` | `true` | Beta | 1.10 | | | `DevicePlugins` | `true` | Beta | 1.10 | |
| `DisableAcceleratorUsageMetrics` | `false` | Alpha | 1.19 | 1.19 | | `DisableAcceleratorUsageMetrics` | `false` | Alpha | 1.19 | 1.19 |