feat: add a global flag to enable/disable PauseRollout#840
Open
jiangpengcheng wants to merge 5 commits intomasterfrom
Open
feat: add a global flag to enable/disable PauseRollout#840jiangpengcheng wants to merge 5 commits intomasterfrom
jiangpengcheng wants to merge 5 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a controller-level configuration switch to pause rollouts globally, so Functions/Sinks/Sources won’t trigger pod recreation on controller upgrades when their generation hasn’t increased.
Changes:
- Introduce a new global
--pause-rolloutCLI flag (and env varPAUSE_ROLLOUT) and plumb it into shared controller config (utils.PauseRollout). - Update
spec.IsPauseRollout()to treat the global flag as an override before checking the per-object annotation. - Wire the new flag through Kubernetes manifests and the Helm chart values/template.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| utils/configs.go | Adds global PauseRollout config variable. |
| main.go | Defines --pause-rollout flag and assigns it to utils.PauseRollout. |
| controllers/spec/common.go | Makes IsPauseRollout honor the global flag before per-object annotation. |
| config/manager/manager.yaml | Adds --pause-rollout=false to default manager args. |
| config/default/manager_auth_proxy_patch.yaml | Adds --pause-rollout=false to patched manager args. |
| charts/function-mesh-operator/values.yaml | Adds controllerManager.pauseRollout Helm value. |
| charts/function-mesh-operator/templates/controller-manager-deployment.yaml | Passes Helm value as --pause-rollout=... arg. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Motivation
Add a pause-rollout flag so that function/sink/source's pods won't be recreated when the controller is upgrade if their generation is not updated
Modifications
Describe the modifications you've done.
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Documentation
Check the box below.
Need to update docs?
doc-required(If you need help on updating docs, create a doc issue)
no-need-doc(Please explain why)
doc(If this PR contains doc changes)