Skip to content

Task: Add MCP Template Reconciliation & Dynamic CRD Generation #273

@n3rdc4ptn

Description

@n3rdc4ptn

Understand the Task

Description
This critical task involves implementing the core reconciliation logic for the ManagedControlPlaneTemplate CRD within the MCP Template PlatformService operator. The reconciler will:

  • Watch for creations, updates, and deletions of ManagedControlPlaneTemplate resources.
  • For each template, it will dynamically construct and apply a new CRD definition to the Kubernetes API server.
  • Crucially, it will correctly set the scope of the generated CRD (either Cluster or Namespaced) based on whether the original ManagedControlPlaneTemplate was defined as cluster-scoped or namespace-scoped.
  • It will include schema validation logic for the generated CRD to ensure its instances will be well-formed and adhere to the template's constraints.
  • This logic will also handle updates and deletions of the ManagedControlPlaneTemplate by updating or cleaning up the corresponding dynamically generated CRD.

Any further valuable resources.

  • how kro do it?
  • Kubernetes Admission Webhooks (Validating and/or Mutating) for sophisticated schema validation and defaulting of the generated CRDs.
  • Controller-runtime concepts for managing watches and reconciliation loops.

What is required to accept the Task as done.

Done Criteria

  • A working ManagedControlPlaneTemplate reconciler within the MCP Template PlatformService operator.
  • Successful dynamic creation, updating, and deletion of custom CRDs in a Kubernetes cluster based on ManagedControlPlaneTemplate definitions.
  • Verification that the generated CRDs have the correct scope (Cluster or Namespaced) matching their source template.
  • Generated CRDs include robust OpenAPI schema validation.
  • Code has been reviewed by other team members
  • Internal technical Documentation created/updated
  • New / changed code is documented
  • Unit Tests created for new code or existing Unit Tests updated
  • Integration Test Suite updated
  • Enduser Documentation updated (if applicable)
  • Successful demonstration in Review

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/taskGeneral task that needs to be done.needs/validationVerify Issue and Prio with PO

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions