feat(helm): added pdb to helm#1617
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Greptile Overview
Summary
Adds PodDisruptionBudget (PDB) resources for the app and realtime deployments to improve availability during voluntary disruptions like node drains and rolling updates.
Key Changes:
- Created PDB templates for both
appandrealtimecomponents - PDBs are conditionally enabled based on
podDisruptionBudget.enabledand component enabled flags - Uses
minAvailableconstraint from values configuration - Properly integrates with existing selector labels
Issues Found:
- Critical: With default
replicaCount: 1andminAvailable: 1, the PDB will completely block voluntary disruptions, preventing rolling updates and node drains - Limited flexibility: only supports
minAvailable, missingmaxUnavailableoption
Confidence Score: 3/5
- This PR has a critical configuration issue that will block updates in default setup
- The PDB implementation is structurally sound with proper templating and conditionals, but has a critical logic flaw: with default values (
replicaCount: 1,minAvailable: 1), voluntary disruptions will be completely blocked, preventing rolling updates and node maintenance. This needs to be addressed before merging. helm/sim/templates/poddisruptionbudget.yamlrequires attention for the minAvailable configuration logic
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| helm/sim/templates/poddisruptionbudget.yaml | 3/5 | Added PDB for app and realtime deployments with minAvailable configuration; potential issues with default single replica setup |
Sequence Diagram
sequenceDiagram
participant User
participant Helm
participant K8s API
participant PDB Controller
participant Deployments
User->>Helm: Install/Upgrade with podDisruptionBudget.enabled=true
Helm->>Helm: Check app.enabled and realtime.enabled
Helm->>K8s API: Create PDB for app (if app.enabled)
Helm->>K8s API: Create PDB for realtime (if realtime.enabled)
K8s API->>PDB Controller: Register PDB resources
PDB Controller->>Deployments: Monitor pod counts via selector labels
Note over PDB Controller,Deployments: Ongoing: PDB Controller enforces minAvailable constraint
User->>K8s API: Trigger voluntary disruption (drain/update)
K8s API->>PDB Controller: Check if disruption allowed
alt minAvailable constraint met
PDB Controller->>K8s API: Allow disruption
K8s API->>Deployments: Proceed with disruption
else minAvailable constraint violated
PDB Controller->>K8s API: Block disruption
K8s API->>User: Disruption blocked by PDB
end
1 file reviewed, 2 comments
234cb33 to
68f193a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
added pdb to helm
Type of Change
Testing
Tested manually
Checklist