Repository navigation
Conversation
Kubernetes uses the environment as the main configuration interface. Read settings into module-owned options so controllers do not depend on process-wide configuration. Local typed values supply defaults. Explicit empty values remain visible to startup validation. Generic decoder hooks let tagged fields receive comma-separated lists and text values without a registry in cmd. Typed trait limits reject invalid entries before a later duplicate can hide an error. New fields need no loader branch. Nonzero defaults can still require changes to the typed default values, and chart exposure is separate. Keep flag descriptions and rendering in the later CLI commit so environment configuration does not depend on flag-only metadata. 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]>
Operators need to inspect and override settings from the command line. Generate flags from the module-owned options and use environment values as their defaults. Explicit CLI values replace those values. Keep descriptions and trait rendering here so the environment-only commit needs no flag metadata or rendering methods. Field discovery requires no per-setting registration in cmd. 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.
Read operator settings from environment variables into module-owned
options structs with koanf.
The loader starts with local typed defaults. The environment provider
supplies raw strings, which generic mapstructure hooks decode as lists
or text values. The loader uses no
confmapprovider or trait-specificreflection hook.
TraitConcurrencystores integer limits.SetandUnmarshalTextreject invalid entries before a later duplicate can hide an error.
A failed parse leaves the previous map unchanged. Valid duplicates
retain the last value. Explicit empty values remain visible to startup
validation instead of receiving defaults again.
Adding a tagged field needs no loader branch or flag registry in
cmd.A setting with a nonzero default can require a change to the typed
default values. Chart exposure and validation can require separate
changes. An external overlay checks that a new
[]stringfield receivesa comma-separated environment value without a change in
cmd.The three commits keep these concerns separate:
--flag=$(ENV_VAR)chart arguments.The CLI commit contains the description tags and trait rendering methods.
CLI values override environment values. Environment values override the
local defaults. The chart commit remains separate and reversible.
Existing tests retain the option wiring and integer trait fixtures.
No new tests are committed. External acceptance and reviewer probes
check parsing, defaults, empty values, CLI replacement, and field discovery.
Relates to #13.