Skip to content

Conversation

Kab1r
Copy link

@Kab1r Kab1r commented Sep 2, 2025

This commit adds Pod Disruption Budget (PDB) configuration options to the Trino Helm chart, bringing it to feature parity with the gateway chart which already has PDB support.

Changes

New Templates

  • Added poddisruptionbudget-coordinator.yaml to manage coordinator pod disruptions
  • Added poddisruptionbudget-worker.yaml to manage worker pod disruptions
    • Worker PDB is only created when server.workers > 0 (not in single-node mode)

Configuration

  • Added coordinator.podDisruptionBudget configuration section in values.yaml

    • Supports both minAvailable and maxUnavailable strategies
    • Default is empty (no PDB created) for backward compatibility
  • Added worker.podDisruptionBudget configuration section in values.yaml

    • Supports both minAvailable and maxUnavailable strategies
    • Default is empty (no PDB created) for backward compatibility

Benefits

Pod Disruption Budgets help maintain application availability during voluntary disruptions such as:

  • Node maintenance and upgrades
  • Cluster autoscaling operations
  • Rolling updates of the cluster

For Trino specifically:

  • Coordinator PDB: Ensures the coordinator remains available during disruptions, preventing complete query processing outages
  • Worker PDB: Controls the rate at which workers can be disrupted, maintaining query processing capacity

Usage Examples

# Ensure at least 1 coordinator is always available
coordinator:
  podDisruptionBudget:
    minAvailable: 1

# Allow at most 1 worker to be unavailable at a time
worker:
  podDisruptionBudget:
    maxUnavailable: 1

Testing

Verified that:

  • Templates render correctly with various PDB configurations
  • PDBs are not created when not configured (backward compatible)
  • Worker PDB is correctly omitted in single-node mode
  • Label selectors properly match coordinator and worker pods

🤖 Generated with Claude Code

This commit adds Pod Disruption Budget (PDB) configuration options to the Trino
Helm chart, bringing it to feature parity with the gateway chart which already
has PDB support.

## Changes

### New Templates
- Added `poddisruptionbudget-coordinator.yaml` to manage coordinator pod disruptions
- Added `poddisruptionbudget-worker.yaml` to manage worker pod disruptions
  - Worker PDB is only created when `server.workers > 0` (not in single-node mode)

### Configuration
- Added `coordinator.podDisruptionBudget` configuration section in values.yaml
  - Supports both `minAvailable` and `maxUnavailable` strategies
  - Default is empty (no PDB created) for backward compatibility

- Added `worker.podDisruptionBudget` configuration section in values.yaml
  - Supports both `minAvailable` and `maxUnavailable` strategies
  - Default is empty (no PDB created) for backward compatibility

## Benefits

Pod Disruption Budgets help maintain application availability during voluntary
disruptions such as:
- Node maintenance and upgrades
- Cluster autoscaling operations
- Rolling updates of the cluster

For Trino specifically:
- **Coordinator PDB**: Ensures the coordinator remains available during
  disruptions, preventing complete query processing outages
- **Worker PDB**: Controls the rate at which workers can be disrupted,
  maintaining query processing capacity

## Usage Examples

```yaml
# Ensure at least 1 coordinator is always available
coordinator:
  podDisruptionBudget:
    minAvailable: 1

# Allow at most 1 worker to be unavailable at a time
worker:
  podDisruptionBudget:
    maxUnavailable: 1
```

## Testing

Verified that:
- Templates render correctly with various PDB configurations
- PDBs are not created when not configured (backward compatible)
- Worker PDB is correctly omitted in single-node mode
- Label selectors properly match coordinator and worker pods

Fixes: #[issue-number]

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Copy link

cla-bot bot commented Sep 2, 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

@nineinchnick nineinchnick changed the title feat: Add Pod Disruption Budget support to Trino chart Add Pod Disruption Budget support to Trino chart Sep 3, 2025
@nineinchnick nineinchnick added the enhancement New feature or request label Sep 3, 2025
maxUnavailable: 25%
# coordinator.deployment.strategy -- The deployment strategy to use to replace existing pods with new ones.

podDisruptionBudget: {}
Copy link
Member

Choose a reason for hiding this comment

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

Set these values in the complete values test, so we know the chart renders correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants