feat(argo-workflows): add deploymentStrategy values for controller and server#3869
Closed
joestadler wants to merge 1 commit intoargoproj:mainfrom
Closed
feat(argo-workflows): add deploymentStrategy values for controller and server#3869joestadler wants to merge 1 commit intoargoproj:mainfrom
joestadler wants to merge 1 commit intoargoproj:mainfrom
Conversation
…d server
The workflow-controller Deployment and the argo-server Deployment did not
expose a way to set spec.strategy. The controller template only set
`type: Recreate` when `replicas == 1`; otherwise no strategy was rendered
on either Deployment, so Kubernetes used the default RollingUpdate
(25%/25%). For operators running 2 replicas this allowed an old pod to
terminate before its replacement was Ready, producing a brief gap that
shows up to UI users as a white screen during chart upgrades. A PDB does
not help here — PDBs only govern voluntary disruptions, not rolling
updates.
This adds `controller.deploymentStrategy` and `server.deploymentStrategy`
values (default `{}`) that thread into the respective Deployment specs
when set, mirroring the pattern in the argo-cd chart. Backwards
compatible: when `controller.deploymentStrategy` is unset, the existing
`type: Recreate` default for `replicas: 1` is preserved; for `replicas: 2+`
the K8s default applies as before.
Operators running 2+ replicas can now opt into zero-downtime rolls with
something like:
controller:
replicas: 2
deploymentStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
Signed-off-by: joestadler <[email protected]>
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.
Why
The
workflow-controllerDeployment and theargo-serverDeployment didn't expose a way to setspec.strategy. The controller template only settype: Recreatewhenreplicas == 1; otherwise no strategy was rendered on either Deployment, so Kubernetes fell back to the defaultRollingUpdate { maxUnavailable: 25%, maxSurge: 25% }.For operators running 2 replicas, that default allows an old pod to terminate before its replacement is Ready, producing a brief gap that surfaces to users as a white screen during chart upgrades. A PDB doesn't help here — PDBs only govern voluntary disruptions (drains), not rolling updates. The argo-cd chart already exposes
deploymentStrategyper component for exactly this reason; this PR brings argo-workflows in line.What
Adds
controller.deploymentStrategyandserver.deploymentStrategyvalues (default{}). When set, the value is rendered intospec.strategyon the corresponding Deployment.Backwards compatible:
controller.deploymentStrategy: {}(default) +controller.replicas: 1→ unchanged:type: Recreateis rendered (preserves the behavior added in https://github.com/argoproj/argo-helm/blob/main/charts/argo-workflows/templates/controller/workflow-controller-deployment.yaml).controller.deploymentStrategy: {}+controller.replicas >= 2→ unchanged: no strategy rendered, K8s default applies.server.deploymentStrategy: {}(default) → unchanged: no strategy rendered.New capability: operators running 2+ replicas can now opt into zero-downtime rolls:
Verified locally with
helm template:type: RecreateChecklist
./scripts/helm-docs.shartifacthub.io/changesannotation inChart.yaml{})