feat(sentinel): configurable deployment strategy and PDB minAvailable - #33
Merged
Merged
Conversation
Two rollout/availability knobs that were previously hardcoded: - sentinel.strategy overrides the sentinel Deployment update strategy (e.g. rollingUpdate maxSurge/maxUnavailable), avoiding a deadlocked rolling update when required anti-affinity plus replicas==nodes leaves no room to surge. - redis/sentinel.podDisruptionBudgetMinAvailable overrides the PDB minAvailable (previously fixed at 2, or 1 when replicas<=2). Regenerated CRD + deepcopy for the new fields. Refs upstream spotahome#662, spotahome#516, spotahome#598.
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.
What
Adds two rollout/availability knobs that were previously hardcoded:
sentinel.strategy— overrides the sentinelDeploymentupdate strategy (e.g.rollingUpdate.maxSurge/maxUnavailable, orRecreate).redis.podDisruptionBudgetMinAvailable/sentinel.podDisruptionBudgetMinAvailable— overrides the PodDisruptionBudgetminAvailable(int or percentage), previously fixed at2(or1when redisreplicas <= 2).Why
replicas == nodes, the default sentinel rolling update can't surge a new pod and deadlocks.maxSurge/maxUnavailablecontrol fixes this.minAvailabledoesn't fit every topology; making it configurable lets operators tune disruption tolerance.Compatibility
Both fields are optional; unset preserves today's behaviour exactly (default rolling update,
minAvailable = 2/1).Changes
api/.../types.go:SentinelSettings.Strategy,{Redis,Sentinel}Settings.PodDisruptionBudgetMinAvailable.generator.go/client.go: wire strategy into the Deployment and the override into the PDB.manifests/, kustomize base, chartcrds/) + deepcopy.Upstream references
CMDFlagsspotahome/redis-operator#598 (modify pdb minAvailable)Test
go build ./...,go test ./...,gofmtclean; CRD regenerated via pinned codegen image.