Repository navigation
Conversation
fwiesel
force-pushed
the
config/cobra
branch
2 times, most recently
from
October 30, 2026 16:16
3c78f30 to
47e0676
Compare
A controller parameter should not need a central configuration registry. Let each module declare typed options and flags. Use cobra and viper for command-line parsing and environment values. Flags take precedence. Keep the chart environment values and document them in --help. Use native integer trait limits so malformed values fail during parsing. Keep concurrency guards and the existing certificate namespace wiring. Signed-off-by: Fabian Wiesel <[email protected]>
The manager reads its settings from the environment, so drop the --flag=$(ENV_VAR) container arguments. Signed-off-by: Fabian Wiesel <[email protected]>
Merging this branch will decrease overall coverage
Coverage detailsCompared to commit f5172c4 (run #41086905849)
Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code. Changed unit test files:
|
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.
Keep operator parameters in module-owned typed options structs.
Adding a parameter changes its module and the chart environment values,
not a central parameter registry.
Cobra and pflag parse the flags.
Viper supplies environment values.
Explicit flags take precedence.
--helpdocuments the environment names.Invalid configuration fails at startup.
Trait concurrency uses
map[string]intand nativeStringToIntVarparsing.Malformed integers fail during parsing. Validation rejects limits below 1
and empty or whitespace-padded trait names. The lowest matching limit wins,
with the default as the cap and a minimum result of 1.
The chart removes six
--flag=$(ENV_VAR)arguments in a separate commit.Alternative to #373, which uses go-flagsfiller instead of cobra and viper.
Existing tests retain the option wiring changes. No new repository tests.
Relates to #13.