Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions helm/ordermanager/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "ordermanager.fullname" . }}
labels:
{{- include "ordermanager.labels" . | nindent 4 }}
spec:
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
selector:
matchLabels:
{{- include "ordermanager.selectorLabels" . | nindent 6 }}
3 changes: 3 additions & 0 deletions helm/ordermanager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ persistence:
size: 1Gi
storageClass: gp2

podDisruptionBudget:
minAvailable: 1
Comment on lines +49 to +50

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🔴 PDB with minAvailable=1 and replicaCount=1 blocks all voluntary disruptions

With replicaCount: 1 (helm/ordermanager/values.yaml:1) and podDisruptionBudget.minAvailable: 1, the PDB will prevent Kubernetes from ever voluntarily evicting the single pod. During node drains (e.g., cluster upgrades, node maintenance), Kubernetes checks if evicting a pod would violate the PDB. Since evicting the only replica would bring available pods from 1 to 0, which is below minAvailable: 1, the eviction is blocked indefinitely. This is a well-known Kubernetes anti-pattern that will cause node drain operations to hang or time out.

Prompt for agents
The PDB minAvailable: 1 combined with replicaCount: 1 (values.yaml:1) means the PDB will block all voluntary pod evictions (node drains, cluster upgrades, etc.) since Kubernetes cannot evict the only replica without violating the budget.

Possible fixes:
1. Change to maxUnavailable: 1 instead of minAvailable: 1 in both the values.yaml and pdb.yaml template. This allows one pod to be unavailable during disruptions, which works with any replica count.
2. Increase replicaCount to at least 2 so that one pod can be evicted while still satisfying minAvailable: 1.
3. Add an enabled flag to podDisruptionBudget (like other optional resources in this chart) and disable it by default when replicaCount is 1.

The template at helm/ordermanager/templates/pdb.yaml would need to be updated if approach 1 is chosen, changing spec.minAvailable to spec.maxUnavailable.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.


monitoring:
enabled: true
path: /metrics
Expand Down