Skip to content

Switch to multi-group Kubebuilder layout #98

Description

@afritzler

Summary

Convert the project from the default single-group Kubebuilder layout to a multi-group layout so additional API groups can be added cleanly alongside the existing maintenance.metal.ironcore.dev group.

Motivation

Today all APIs live under api/v1alpha1/ and all controllers under internal/controller/. The project is expected to grow beyond the current Console CRD and the maintenance group, and adding more groups under the single-group layout would mix unrelated types and reconcilers in the same directories.

Proposed Changes

  1. Enable multi-group mode:
    kubebuilder edit --multigroup=true
  2. Move the existing API and controller into group-scoped directories:
    • api/v1alpha1/api/maintenance/v1alpha1/
    • internal/controller/internal/controller/maintenance/
  3. Update import paths in all Go files (cmd/main.go, controller, tests, etc.).
  4. Update the path field for the Console resource in PROJECT.
  5. Fix relative CRD paths in the test suite (suite_test.go needs one additional ..).
  6. Regenerate manifests and deepcopy:
    make manifests generate
  7. Verify everything still builds and tests pass:
    make lint-fix test

Acceptance Criteria

  • PROJECT contains multigroup: true and the updated resource path.
  • Console types live under api/maintenance/v1alpha1/ and its controller under internal/controller/maintenance/.
  • make manifests generate produces no diff after the move.
  • make test passes.
  • No functional change to the Console CRD or reconciler behavior.

Out of Scope

  • Adding any new API group or kind. This issue is purely the layout change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions