-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PodDisruptionBudget to Atlassian DC Helm Charts #636
Conversation
Can you describe a scenario in which pod disruption budget is used with our products? |
src/main/charts/bamboo/values.yaml
Outdated
# -- PodDisruptionBudget: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ | ||
# You can specify only one of maxUnavailable and minAvailable in a single PodDisruptionBudget | ||
# | ||
pdb: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer using full podDisruptionBudget
name. Maybe pbd
is a common term in Kubernetes community, but it is still a cognitive overload every time we encounter this shorthand. It doesn't cost much to use the full name and it is clearer for customers as well.
src/main/charts/bamboo/README.md
Outdated
@@ -139,6 +139,7 @@ Kubernetes: `>=1.21.x-0` | |||
| monitoring.serviceMonitor.prometheusLabelSelector | object | `{}` | ServiceMonitorSelector of the prometheus instance. | | |||
| monitoring.serviceMonitor.scrapeIntervalSeconds | int | `30` | Scrape interval for the JMX service. | | |||
| nodeSelector | object | `{}` | Standard K8s node-selectors that will be applied to all Bamboo pods | | |||
| pdb | object | `{"annotations":{},"enabled":false,"labels":{},"maxUnavailable":null,"minAvailable":null}` | PodDisruptionBudget: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ You can specify only one of maxUnavailable and minAvailable in a single PodDisruptionBudget | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can also include Note that when both minAvailable and maxUnavailable are set, maxUnavailable takes precedence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, makes sense
@nanux thanks for your comments! In more than 50% of helm charts that I have recently installed, pdb is pdb :) Though, there are ones where it's PodDisruptionBudget. I have changed the name. As to how pdb can be used with Atlassian DC products, it's not different from any deployment or statefulset. PDB is a guard rail to prevent a node from draining if pdb says there must be, say, at least 2 pods at all times. DPB is ofted used in combo with anti affinity rules to make sure your app always has some quorum. In case of DC products, you may want to make sure that there are at least 3 running and ready Jira pods at all times. I can't explain it better than Kube docs do 😃 |
PodDisruptionBudget is a critical resource when it comes to high availability and (un)planned disruptions like worker node upgrades, evictions etc.
This PR adds a pdb template and a pbd stanza in values.yaml. Note that when both
minAvailable
andmaxUnavailable
are set,maxUnavailable
takes precedence. By default PDB is disabled.Just in case, custom pdb labels and annotations can be defined in values. Covered with unit tests.
Checklist
e2e
label)