Skip to content

Conversation

@arturshadnik
Copy link
Member

@arturshadnik arturshadnik commented Jul 14, 2025

Proposal

Fleetconfig Controller can support creating and installing arbitrary ManagedClusterAddOns by leveraging the clusteradm addon command.

Changes

This PR proposes the API changes for supporting add-ons. The following changes are added.

FleetConfig.Spec.AddOns

  • Add-ons to be configured on the hub and become available to install onto spokes
  • Exposes all the flags of the clusteradm addon create command
  • The manifests to be used for creating the addons are provided via the helm chart and can be in one of 2 formats:
    1. inline manifests
    2. URL to download the manifests. A URL pointing to a .yaml file can be used directly, and OCI artifacts would be downloaded first and written to a temp file.
  • The manifests for all the AddOns will be saved to a single configmap, where each key corresponds to FleetConfig.Spec.AddOns[*].Name, and the value will be either the URL or the raw manifests to be consumed by the controller

FleetConfig.Spec.Spokes[*].AddOns

  • The add-ons to enable for that specific spoke.
  • Supports configuring an installNamespace and adding annotations, in line with what the clusteradm addon enable command supports
  • FleetConfig.Spec.Spokes[*].AddOns[*].Name corresponds to one of the top-level add-ons, or a default add-on (TBD in a followup)

TODO

This PR does not introduce any changes to the controller code. The following work will be done in followup PRs:

  1. Controller implementation
    a. Handling the full lifecycle of the AddOnTemplates and other Hub resources
    b. Handling the full lifecycle of ManagedClusterAddOns as spoke clusters are joined and unjoined
  2. Configuring default add-ons in the FleetConfig Controller helm chart that will be created and reconciled in all cases.

@openshift-ci
Copy link

openshift-ci bot commented Jul 14, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: arturshadnik

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@arturshadnik arturshadnik force-pushed the feat/addon-api branch 2 times, most recently from 9ff0295 to 527ea1c Compare July 15, 2025 02:00
arturshadnik and others added 4 commits July 14, 2025 19:11
Signed-off-by: Artur Shad Nik <arturshadnik@gmail.com>

chore: whitespace

Signed-off-by: Artur Shad Nik <arturshadnik@gmail.com>
Co-authored-by: Ahmad Malik Ibrahim <ahm.ibr@hotmail.com>
Signed-off-by: Artur Shad Nik <arturshadnik@gmail.com>

chore: Update fleetconfig-controller/api/v1alpha1/fleetconfig_types.go

Co-authored-by: Ahmad Malik Ibrahim <ahm.ibr@hotmail.com>
Signed-off-by: Artur Shad Nik <arturshadnik@gmail.com>

chore: update chart to reflect field rename

Signed-off-by: Artur Shad Nik <arturshadnik@gmail.com>

chore: update chart to reflect field rename

Signed-off-by: Artur Shad Nik <arturshadnik@gmail.com>
Co-authored-by: Ahmad Malik Ibrahim <ahm.ibr@hotmail.com>
Signed-off-by: Artur Shad Nik <arturshadnik@gmail.com>

chore: regenerate

Signed-off-by: Artur Shad Nik <arturshadnik@gmail.com>
Co-authored-by: Ahmad Malik Ibrahim <ahm.ibr@hotmail.com>
Signed-off-by: Artur Shad Nik <arturshadnik@gmail.com>

chore: regenerate

Signed-off-by: Artur Shad Nik <arturshadnik@gmail.com>
@ahmad-ibra
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jul 15, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 87b017c into open-cluster-management-io:main Jul 15, 2025
7 checks passed
@arturshadnik arturshadnik deleted the feat/addon-api branch July 15, 2025 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants