Skip to content

feat(chart): add optional PodDisruptionBudget for php-fpm and nginx - #175

Open
danielqb wants to merge 1 commit into
eftechcombr:mainfrom
danielqb:clean/pod-disruption-budget
Open

feat(chart): add optional PodDisruptionBudget for php-fpm and nginx#175
danielqb wants to merge 1 commit into
eftechcombr:mainfrom
danielqb:clean/pod-disruption-budget

Conversation

@danielqb

Copy link
Copy Markdown

Problem

Neither php-fpm nor nginx had a PodDisruptionBudget, so there was no
guardrail against voluntary disruptions (node drains, cluster-autoscaler
scale-downs) taking down every replica at once when replicaCount > 1.

Fix

Added templates/glpi-poddisruptionbudget.yaml with independent PDBs for
php-fpm and nginx, each gated behind its own pdb.enabled (default
false). Defaulted to disabled rather than enabled-by-default because the
chart's default replicaCount is 1 for both components, and a PDB
requiring minAvailable: 1 (or maxUnavailable: 0) on a single-replica
workload permanently blocks voluntary evictions - Kubernetes can never
satisfy the budget. This is documented inline in values.yaml. Supports
both minAvailable and maxUnavailable (minAvailable takes precedence when
set).

Testing

  • helm lint: 0 failures
  • helm template (default): no PDB rendered
  • helm template --set glpi.phpfpm.pdb.enabled=true --set
    glpi.phpfpm.pdb.minAvailable=1 --set glpi.nginx.pdb.enabled=true:
    both PDBs render with correct selectors

## Problem

Neither php-fpm nor nginx had a PodDisruptionBudget, so there was no
guardrail against voluntary disruptions (node drains, cluster-autoscaler
scale-downs) taking down every replica at once when replicaCount > 1.

## Fix

Added templates/glpi-poddisruptionbudget.yaml with independent PDBs for
php-fpm and nginx, each gated behind its own `pdb.enabled` (default
false). Defaulted to disabled rather than enabled-by-default because the
chart's default replicaCount is 1 for both components, and a PDB
requiring minAvailable: 1 (or maxUnavailable: 0) on a single-replica
workload permanently blocks voluntary evictions - Kubernetes can never
satisfy the budget. This is documented inline in values.yaml. Supports
both minAvailable and maxUnavailable (minAvailable takes precedence when
set).

## Testing

- helm lint: 0 failures
- helm template (default): no PDB rendered
- helm template --set glpi.phpfpm.pdb.enabled=true --set
  glpi.phpfpm.pdb.minAvailable=1 --set glpi.nginx.pdb.enabled=true:
  both PDBs render with correct selectors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant