Skip to content

feat: add a global flag to enable/disable PauseRollout#840

Open
jiangpengcheng wants to merge 5 commits intomasterfrom
add_pause_rollout_flag
Open

feat: add a global flag to enable/disable PauseRollout#840
jiangpengcheng wants to merge 5 commits intomasterfrom
add_pause_rollout_flag

Conversation

@jiangpengcheng
Copy link
Copy Markdown
Member

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

  • Make sure that the change passes the CI checks.

(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:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

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)

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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-rollout CLI flag (and env var PAUSE_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.

@jiangpengcheng jiangpengcheng requested review from a team, freeznet and nlu90 as code owners April 14, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-required This pr needs a document

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants