New config-file first configuration approach#129
Merged
Conversation
3cdb493 to
607ea2e
Compare
e209b63 to
402bc30
Compare
89c3a05 to
805a7d1
Compare
60f24ee to
83cbaf9
Compare
83cbaf9 to
c9eb6ac
Compare
AlexVulaj
reviewed
May 5, 2026
AlexVulaj
reviewed
May 5, 2026
AlexVulaj
reviewed
May 5, 2026
bd378eb to
dd047d3
Compare
porridge
reviewed
May 6, 2026
Co-authored-by: Marcin Owsiany <porridge@redhat.com>
13260a2 to
d6fc8db
Compare
Collaborator
Author
|
@porridge @AlexVulaj merged in current main. |
Collaborator
Author
|
@porridge I believe I have now addressed all of your comments except the one about helper functions for the pflag setup. |
AlexVulaj
reviewed
May 8, 2026
AlexVulaj
reviewed
May 8, 2026
added 2 commits
May 11, 2026 14:01
Also: * Switch to using mergo (& removing dead code after the switch). * Add tests for CLI flag parsing.
7037a64 to
5bcd644
Compare
Collaborator
Author
|
@porridge, @AlexVulaj I have reworked the flag parsing setup, reducing duplication and complexity. |
Collaborator
Author
|
(Manually) merged in main branch to fix conflicts. |
AlexVulaj
reviewed
May 12, 2026
AlexVulaj
approved these changes
May 12, 2026
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.
Summary
deployer.Config(internal/deployer/config.go) — a single, self-contained, YAML-serializable configuration struct that replaces ~20 loose variables, setter methods, and override maps scattered across the deployer and CLI layers.--override/--setmachinery with a config-file-first model:--config/-cloads a full YAML config,--setwrites directly into the Config struct via dotted paths, and all CLI flags are nowconfigShortCutwrappers that mutate the same struct.internal/types/—ClusterType,Exposure, andResourceProfileare now typed enums with YAML marshal/unmarshal, replacing free-form strings.clusterdefaults— collapses theManager/Detector/Applicatorabstraction (flagged as over-engineered via TODO(ROX-34499)) into a singleApplyClusterDefaultsfunction that merges a defaults map into Config.--dry-runflag and moves config resolution (version lookup, operator config, spec composition) intorunDeploybefore the deployer is invoked.Deployer— removes ~15 fields and ~10 setter methods (SetMainImageTag,SetFeatureFlags,SetUseOLM,SetPortForwardingEnabled, etc.). The deployer now receives configuration viaSetConfig()and reads everything fromd.config.*.This PR takes care of
and addresses a couple of other TODOs in the code.