Skip to content

Conversation

@tadeha
Copy link
Member

@tadeha tadeha commented Jun 13, 2025

This PR adds support for topologySpreadConstraints to the worker deployment. This allows users to improve cluster resilience and resource balancing by controlling how worker pods are spread across nodes and availability zones.

The feature is enabled by setting the worker.topologySpreadConstraints value in values.yaml. Tests have been added to verify the implementation.

Example values.yaml configuration:

worker:
  topologySpreadConstraints:
    - maxSkew: 1
      topologyKey: "kubernetes.io/hostname"
      whenUnsatisfiable: "ScheduleAnyway"
      labelSelector:
        matchLabels:
          app.kubernetes.io/name: trino
          app.kubernetes.io/component: worker

@cla-bot
Copy link

cla-bot bot commented Jun 13, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@cla-bot
Copy link

cla-bot bot commented Jun 13, 2025

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to [email protected]. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@tadeha tadeha requested a review from nineinchnick June 13, 2025 18:04
@nineinchnick nineinchnick changed the title feat(chart): Add topologySpreadConstraints for workers Add topologySpreadConstraints for workers Jun 16, 2025
@nineinchnick nineinchnick added the enhancement New feature or request label Jun 16, 2025
@nineinchnick
Copy link
Member

@cla-bot check

@cla-bot cla-bot bot added the cla-signed label Jun 16, 2025
@cla-bot
Copy link

cla-bot bot commented Jun 16, 2025

The cla-bot has been summoned, and re-checked this pull request!

@nineinchnick nineinchnick force-pushed the feat/worker-topology-spread-constraints branch from 6819d46 to a0c1a65 Compare June 16, 2025 08:18
@nineinchnick nineinchnick force-pushed the feat/worker-topology-spread-constraints branch from a0c1a65 to ad9eea3 Compare June 16, 2025 08:50
@nineinchnick nineinchnick merged commit 2856eba into trinodb:main Jun 16, 2025
11 checks passed
@akkbng
Copy link

akkbng commented Jul 4, 2025

Hey @tadeha , thanks for adding this!
quick question: are you also planning on adding the topologySpreadConstraints support for the coordinator deployment?

@tadeha
Copy link
Member Author

tadeha commented Aug 12, 2025

deployment

Hi @akkbng, actually, having multiple coordinators didn't make sense to us, so we stick to workers for now. You can add them with the same template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

3 participants