Skip to content

Introduce ComponentConfig-style manager configuration #1032

Description

@coderabbitai

Summary

Introduce a configuration-file / ComponentConfig-style configuration model for the metal-operator manager, reducing reliance on additional flag.Var registrations.

The manager already exposes more than 40 flags. Future settings—such as configuring the discovery-token signing-secret behavior introduced in #750—should have a scalable, structured configuration path instead of continuing to expand the CLI flag surface.

Rationale

A typed configuration structure can improve discoverability, validation, defaults, and long-term maintainability while preserving a clear migration story for existing deployments.

Affected areas

  • Manager startup and CLI flag registration in cmd/main.go
  • Controller and registry configuration currently supplied through manager flags
  • Configuration documentation and deployment manifests
  • Tests for configuration parsing, defaults, and validation

Required changes

  • Define a versioned, typed ComponentConfig-style API or configuration-file schema for manager settings.
  • Support loading and validating configuration from a file at startup.
  • Establish defaults and precedence rules between configuration-file values and existing CLI flags.
  • Migrate or provide a documented path to migrate existing manager settings without introducing new flag.Var calls for future options.
  • Document the configuration format, validation failures, and migration/compatibility behavior.

Acceptance criteria

  • The manager can load a typed configuration file and rejects invalid configuration with actionable errors.
  • Existing deployments using current flags retain a documented compatibility path.
  • Configuration precedence and defaults are explicitly tested and documented.
  • At least one currently flag-based manager setting is demonstrated through the new configuration mechanism.
  • Documentation describes how future components/settings should be added without increasing manager flag proliferation.

Context

Requested by @stefanhipfel during review of #750.

Activity

  1. coderabbitai commented on Jul 17, 2026

    @coderabbitai
    ContributorAuthor
    🔗 Related PRs

    #536 - Customization of default discovery Ignition [merged]
    #718 - Add Prometheus metrics and alerts for server monitoring [merged]
    #739 - Improve Redfish protocol and TLS certificate verification handling [merged]
    #746 - Add support for dynamic BMC settings in BMCSettingsSet type [merged]
    #877 - Honor --kubeconfig and add --context flag in metalctl [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

  • Status
    No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions