feat: support configurable PodDisruptionBudget#422
Open
davidxia wants to merge 1 commit into
Open
Conversation
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Author
|
recheck |
authzedbot
added a commit
to authzed/cla
that referenced
this pull request
May 10, 2026
3d8de88 to
11adb58
Compare
ecordell
requested changes
May 12, 2026
Contributor
ecordell
left a comment
There was a problem hiding this comment.
One small change, otherwise this looks good! Thanks for the contribution!
FYI full customization of the PDB is possible with the patches feature, but I can see why we'd want these to have shortcuts.
| // If PDB is disabled, delete any existing PDB and skip creation | ||
| if cfg.PDB.Disabled { | ||
| for _, pdb := range pdbComponent.List(ctx, CtxClusterNN.MustValue(ctx)) { | ||
| nn := types.NamespacedName{Name: pdb.Name, Namespace: pdb.Namespace} |
Contributor
There was a problem hiding this comment.
Can we also verify a match on the component labels too? metadata.LabelsForComponent(clusterName, metadata.ComponentPDBLabel). This way we can be sure to only delete a PDB that was operator created, and not one that happened to have a name that matches
Adds three new SpiceDBCluster config fields: - `pdbDisabled` (bool): disables PDB creation entirely; any existing PDB owned by the cluster is deleted on the next reconcile - `pdbMaxUnavailable` (int or percentage string, e.g. "2" or "50%"): sets the PDB's maxUnavailable field; defaults to 1 when neither field is set - `pdbMinAvailable` (int or percentage string): sets the PDB's minAvailable field; mutually exclusive with pdbMaxUnavailable Fixes authzed#414 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
11adb58 to
c4bd31a
Compare
Author
|
Thanks, I didn't see the patches functionality. |
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
Resolves #414.
Adds a new
pdbconfig object onSpiceDBClusterto give users control over the PodDisruptionBudget:pdb.disabled(bool, defaultfalse): whentrue, the operator deletes any existing PDB owned by the cluster and stops creating onepdb.maxUnavailable(integer or percentage string, e.g."2"or"50%"): sets the PDB'smaxUnavailablefield; defaults to1when neither field is set (preserving existing behavior)pdb.minAvailable(integer or percentage string): sets the PDB'sminAvailablefield; mutually exclusive withpdb.maxUnavailableExample usage
Test plan
maxUnavailable(integer and percentage), customminAvailable, and validation error when both are setgo test ./pkg/...passes🤖 Generated with Claude Code