Skip to content

feat(chart): web/worker reliability — PDB, configurable probes, anti-affinity, HPA v2#77

Open
anchapin wants to merge 1 commit into
179d_spot_instancefrom
feat/chart-web-worker-reliability
Open

feat(chart): web/worker reliability — PDB, configurable probes, anti-affinity, HPA v2#77
anchapin wants to merge 1 commit into
179d_spot_instancefrom
feat/chart-web-worker-reliability

Conversation

@anchapin

Copy link
Copy Markdown
Collaborator

Summary

Adds Kubernetes reliability features to the web and worker deployments: PodDisruptionBudgets, configurable probes, pod anti-affinity, topology spread, HPA v2 with behavior controls.

Changes

Web Deployment

  • PodDisruptionBudget (web-pdb.yaml): prevents all web pods being disrupted simultaneously
  • Configurable probes: readiness/liveness/startup probe paths, delays, timeouts, thresholds all values-driven
  • Pod anti-affinity: preferred hostname spread (optional, web.podAntiAffinity.enabled)
  • Topology spread: zone spread with ScheduleAnyway (optional, web.topologySpread.enabled)
  • Lifecycle preStop: configurable sleep before SIGTERM for graceful drain
  • Replica count configurable via web.replicaCount

Web HPA

  • Upgraded from autoscaling/v1 to autoscaling/v2
  • Added web_hpa.enabled flag (default: true)
  • Added scaleUp/scaleDown behavior blocks (stabilization windows, policies)

Worker Deployment

  • PodDisruptionBudget (worker-pdb.yaml)
  • Configurable QUEUES via worker.queues
  • Moved cluster-autoscaler.kubernetes.io/safe-to-evict annotation to pod spec (was incorrectly on Deployment)
  • terminationGracePeriodSeconds increased from 180 → 300

Values Added

web.replicaCount, web.terminationGracePeriodSeconds
web.readinessProbe.{path,initialDelaySeconds,periodSeconds,timeoutSeconds,failureThreshold}
web.livenessProbe.*, web.startupProbe.*
web.lifecycle.preStopSleepSeconds
web.podDisruptionBudget.{enabled,minAvailable}
web.podAntiAffinity.{enabled,type,weight,topologyKey}
web.topologySpread.{enabled,maxSkew,topologyKey,whenUnsatisfiable}
web_hpa.enabled, web_hpa.scaleUp/Down.*
worker.queues, worker.podDisruptionBudget.*
worker.container.terminationGracePeriodSeconds (180→300)

…affinity, HPA v2

- Add PodDisruptionBudgets for web and worker (values.web.podDisruptionBudget,
  values.worker.podDisruptionBudget)
- Add configurable readiness/liveness/startup probes for web deployment
- Add pod anti-affinity (preferred hostname spread) and topology spread
  constraints for web deployment
- Upgrade web HPA to autoscaling/v2 with enabled flag and behavior controls
  (scaleUp/scaleDown stabilization windows, policies)
- Add lifecycle preStop sleep for graceful web drain
- Move cluster-autoscaler safe-to-evict annotation from Deployment to pod
  spec (correct placement for the annotation to take effect)
- Make worker QUEUES configurable via values.worker.queues
- Increase worker terminationGracePeriodSeconds from 180 to 300

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

2 participants