Skip to content

feat(controller): add --configmap-name flag to override controller ConfigMap#4664

Open
a1exx-k wants to merge 1 commit intoargoproj:masterfrom
a1exx-k:feat/configmap-name-flag
Open

feat(controller): add --configmap-name flag to override controller ConfigMap#4664
a1exx-k wants to merge 1 commit intoargoproj:masterfrom
a1exx-k:feat/configmap-name-flag

Conversation

@a1exx-k
Copy link
Copy Markdown

@a1exx-k a1exx-k commented Mar 20, 2026

Summary

  • The controller ConfigMap name was hardcoded to argo-rollouts-config with no way to override it at runtime
  • Adds a --configmap-name flag to the argo-rollouts-controller binary so operators can specify an alternative name
  • Useful when running multiple controller instances in the same namespace, or when the default name conflicts with existing resources

Resolves #4665

Changes

  • cmd/rollouts-controller/main.go: new --configmap-name flag (default: argo-rollouts-config)
  • controller/controller.go: NewManager and NewAnalysisManager accept a rolloutsConfigMapName string parameter, replacing the hardcoded defaults.DefaultRolloutsConfigMapName constant at the call sites
  • controller/controller_test.go: updated call sites to pass defaults.DefaultRolloutsConfigMapName

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
  • The title of the PR is (a) conventional with a list of types and scopes found here, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
  • I've signed my commits with DCO
  • My builds are green. Try syncing with master if they are not.
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • I have run all tests locally (including the flaky ones) and they pass on my workstation
  • I have used LLM/AI/Agent tools for this PR but I am responsible for all code of this PR
  • I understand what the code does and WHY/HOW it works in several scenarios
  • I know if my code is just adding new functionality or changing old functionality for existing users
  • My organization is added to USERS.md.

🤖 Generated with Claude Code

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.89%. Comparing base (e046515) to head (89cb569).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4664      +/-   ##
==========================================
+ Coverage   84.86%   84.89%   +0.02%     
==========================================
  Files         164      164              
  Lines       18954    18961       +7     
==========================================
+ Hits        16086    16097      +11     
+ Misses       2007     2005       -2     
+ Partials      861      859       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 20, 2026

Published E2E Test Results

  4 files    4 suites   3h 40m 6s ⏱️
120 tests 109 ✅  7 💤 4 ❌
488 runs  452 ✅ 28 💤 8 ❌

For more details on these failures, see this check.

Results for commit 89cb569.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 20, 2026

Published Unit Test Results

2 444 tests   2 444 ✅  3m 18s ⏱️
  129 suites      0 💤
    1 files        0 ❌

Results for commit 89cb569.

♻️ This comment has been updated with latest results.

@a1exx-k a1exx-k marked this pull request as draft March 20, 2026 13:00
@a1exx-k a1exx-k force-pushed the feat/configmap-name-flag branch from 44710f7 to 404ad5e Compare March 20, 2026 14:17
@a1exx-k a1exx-k marked this pull request as ready for review March 20, 2026 14:40
…nfigMap

The controller ConfigMap name was hardcoded to "argo-rollouts-config" with
no way to override it. This adds a --configmap-name flag so operators can
specify an alternative name, which is useful when running multiple controller
instances in the same namespace or when the default name conflicts with
existing resources.

Signed-off-by: Alex Kazantcev <[email protected]>
Co-Authored-By: Claude Opus 4.6 <[email protected]>
@a1exx-k a1exx-k force-pushed the feat/configmap-name-flag branch from 404ad5e to 89cb569 Compare March 26, 2026 11:31
@sonarqubecloud
Copy link
Copy Markdown

@a1exx-k a1exx-k requested a review from blkperl March 30, 2026 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow override of controller configmap name

2 participants