Skip to content
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 PodDisruptionBudgets to the Pinot Helm chart #13153

Conversation

andimiller
Copy link
Contributor

@andimiller andimiller commented May 14, 2024

I've set these by default at allowing 50% of the servers/brokers/controllers to be unavailable, and exposed these settings in the configuration so the user can change them.

These prevent outages when the underlying kuberenetes cluster undergoes an upgrade.

You might configure these like so in your helm yaml settings:

broker:
  replicaCount: 2
  pdb:
    enabled: true
    minAvailable: 50% # we could also set this to 1
    maxUnavailable: "" # can turn these off with empty string
controller:
  replicaCount: 2
  pdb:
    enabled: true
    minAvailable: 1 # we could also set this to 50%
    maxUnavailable: "" # can turn these off with empty string
server:
  replicaCount: 12
  pdb:
    enabled: true
    maxUnavailable: 1
    # minAvailable: 11 # these would be equivalent

I've set these by default at allowing 50% of the servers/brokers/controllers to be unavailable, and exposed these settings in the configuration so the user can change them.

These prevent outages when the underlying kuberenetes cluster undergoes an upgrade.
@codecov-commenter
Copy link

codecov-commenter commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.25%. Comparing base (59551e4) to head (b2dfe14).
Report is 470 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13153      +/-   ##
============================================
+ Coverage     61.75%   62.25%   +0.50%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2529      +93     
  Lines        133233   138215    +4982     
  Branches      20636    21386     +750     
============================================
+ Hits          82274    86048    +3774     
- Misses        44911    45762     +851     
- Partials       6048     6405     +357     
Flag Coverage Δ
custom-integration1 <0.01% <ø> (-0.01%) ⬇️
integration <0.01% <ø> (-0.01%) ⬇️
integration1 <0.01% <ø> (-0.01%) ⬇️
integration2 0.00% <ø> (ø)
java-11 62.19% <ø> (+0.48%) ⬆️
java-21 62.14% <ø> (+0.51%) ⬆️
skip-bytebuffers-false 62.22% <ø> (+0.47%) ⬆️
skip-bytebuffers-true 62.12% <ø> (+34.39%) ⬆️
temurin 62.25% <ø> (+0.50%) ⬆️
unittests 62.25% <ø> (+0.50%) ⬆️
unittests1 46.75% <ø> (-0.14%) ⬇️
unittests2 27.92% <ø> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@abhioncbr
Copy link
Contributor

Thanks for the contribution.

In general, one comment from K8s before v1.21 support, and to give other users better control over the PDB, can we have a boolean property say enabled to make the PDB optional?

@andimiller
Copy link
Contributor Author

Thanks for the contribution.

In general, one comment from K8s before v1.21 support, and to give other users better control over the PDB, can we have a boolean property say enabled to make the PDB optional?

Sure, done, and since the default replica counts of everything in values.yaml is 1 I've defaulted it to off

@Jackie-Jiang
Copy link
Contributor

cc @xiangfu0 @zhtaoxiang

@gortiz
Copy link
Contributor

gortiz commented May 20, 2024

FYI, the zookeeper chart from bitnami (the one we depend on) also has this ability.

metadata:
name: {{ include "pinot.broker.fullname" . }}
spec:
minAvailable: {{ .Values.broker.disruptionBudget.minAvailable }}
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice to also have the ability to define a maxUnavailable.

This is specifically useful in servers, where if we know the min replica size for all tables, we can configure pdb as maxUnavailable: replicaSize - 1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've left the defaults values for broker and controller at 50%, although replicaSize - 1 would make sense too

The number for servers would be maxUnavailable: $tableReplicas - 1 or similar, which isn't easily available here so I just set it to 1 in the default values

@andimiller
Copy link
Contributor Author

FYI, the zookeeper chart from bitnami (the one we depend on) also has this ability.

I'll adjust this to work with the same config settings as the zookeeper chart then, if people are already familiar with that one

* expose `maxUnavailable`
* rename from `disruptionBudget` to `pdb`

I've kept the flag called `enabled` just to match everything else
@andimiller
Copy link
Contributor Author

FYI, the zookeeper chart from bitnami (the one we depend on) also has this ability.

I've adjusted this to be closer how to the zookeeper chart works, with pdb as the config name, and exposing both minAvailable and maxUnavailable

@Jackie-Jiang Jackie-Jiang merged commit c797305 into apache:master May 21, 2024
19 checks passed
gortiz pushed a commit to gortiz/pinot that referenced this pull request Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants