elastisys / compliantkubernetes-kubespray

Apache License 2.0
28 stars 7 forks source link

Set stricter topologyConstraints defaults #358

Closed Zash closed 7 months ago

Zash commented 8 months ago

What kind of PR is this?

Required: Mark one of the following that is applicable:

Optional: Mark one or more of the following that are applicable:

[!important] Critical security fixes should be marked with kind/security Breaking changes should be marked kind/admin-change or kind/dev-change depending on type

Platform Administrator notice

The default topologySpreadConstraints for kube scheduler changed. You may want to review existing pod scheduling constraints that could now be redundant.

Application Developer notice

The default topologySpreadConstraints for kube scheduler changed. You may want to review existing pod scheduling constraints that could now be redundant.

What does this PR do / why do we need this PR?

We want to provide saner pod scheduling defaults.

Additional information to reviewers

Tested by verifying that after a kubespray run, /etc/kubernetes/kubescheduler-config.yaml has the added config and kube-scheduler starts without issue. Launching a deployment with varying numbers of replicas result in pods evenly distributed across worker nodes with a skew of at most 1 when replicas are not evenly divisible by the number of nodes.

Screenshots

Checklist