HYPERFLEET-1122 - feat: add PodDisruptionBudgets for maestro deployments#59
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds conditional PodDisruptionBudget manifests for the Maestro server, PostgreSQL, Mosquitto, and agent. Each resource sets Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
| HYPERFLEET-1122 | ||
| */}} | ||
|
|
||
| {{- if .Values.server.enabled | default true }} |
There was a problem hiding this comment.
Bug: | default true makes this guard always true — server PDB can't be disabled
{{- if .Values.server.enabled | default true }}In Helm, default replaces any falsy value, including explicit false. So server.enabled: false in values evaluates to false | default true → true. The block always renders.
The other three guards do not have this issue. Either drop the | default true:
| {{- if .Values.server.enabled | default true }} | |
| {{- if .Values.server.enabled }} |
Or, since values.yaml does not define server.enabled and the server is always-on, remove the guard entirely and make the server PDB unconditional (matching how postgresql/mosquitto behave when enabled).
There was a problem hiding this comment.
Fixed by removing | default true to match the other three guards. TY
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rh-amarin The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
a48df96
into
openshift-hyperfleet:main
Summary
Adds PodDisruptionBudgets (PDBs) for all four Maestro deployments to protect against voluntary disruptions during cluster operations (node drains, upgrades, kubectl drain).
Changes
helm/maestro/templates/pdb.yamlminAvailable: 1Validation
✅ Acceptance Criteria
1. Four PDBs created with correct configuration:
2. PDBs protect pods from voluntary eviction:
All four deployments are protected — eviction blocked until replicas scale up or PDB conditions are met.
Technical Notes
policy/v1API (GA since Kubernetes 1.21, stable across all supported OpenShift versions)maestro-pdb:app: maestro,app.kubernetes.io/name: servermaestro-agent-pdb:app: maestro-agent,app.kubernetes.io/name: agentmaestro-db-pdb:name: maestro-dbmaestro-mqtt-pdb:name: maestro-mqttTesting
helm templaterenders 4 valid PDBs with correct selectorskubectl get pdbshows all 4kubectl draincorrectly blocks pod eviction