Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TopologySpreadConstraints: add minDomains=3 #653

Merged
merged 1 commit into from
Sep 24, 2024
Merged

Conversation

goat-ssh
Copy link
Contributor

@goat-ssh goat-ssh commented Sep 19, 2024

This help Cluster Autoscaler to provision nodes in zone which are set to 0 nodes.

Require at least 3 nodes (as we have 3 zones)

https://kubernetes.io/blog/2023/04/17/fine-grained-pod-topology-spread-features-beta/#kep-3022-min-domains-in-pod-topology-spread

Summary of changes

Checklist

  • Link to issue this PR refers to: https://github.com/crate/cloud/issues/2069
  • Relevant changes are reflected in CHANGES.rst
  • Added or changed code is covered by tests
  • Documentation has been updated if necessary
  • Changed code does not contain any breaking changes (or this is a major version change)

CHANGES.rst Outdated
@@ -17,6 +17,7 @@ Unreleased

* Added configuration for JWT authentication from CrateDB version 5.7.2 onwards.
* Bumped version of the JMX Exporter to ``1.2.0``
* Add ``minDomains`` to ``TopologySpreadConstraint`` to ensure that pods are spread across zones.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this goes into Unreleased.

This help Cluster Autoscaler to provision nodes in zone which are set to 0 nodes.

Require at least 3 nodes (as we have 3 zones)

https://kubernetes.io/blog/2023/04/17/fine-grained-pod-topology-spread-features-beta/#kep-3022-min-domains-in-pod-topology-spread
Copy link
Contributor

@WalBeh WalBeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -270,6 +270,7 @@ def get_topology_spread(
topology_spread = [
V1TopologySpreadConstraint(
max_skew=1,
min_domains=3,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not 100% sure whether we can always add this, or need to be more granular depending on the setup, or scaling of a cluster.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we add the topologySpreadContraints on all the Statefulset and the Setting seemingly does not hurt eg. on a Nodegroup with only one Availability Zone.
(To answer my question, myself).

@goat-ssh goat-ssh merged commit 2f1f197 into master Sep 24, 2024
6 checks passed
@goat-ssh goat-ssh deleted the s/mindomains branch September 24, 2024 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants