Skip to content

Conversation

@TylerGillson
Copy link
Collaborator

@TylerGillson TylerGillson commented Jun 19, 2025

✨ Unlock the power of GitOps for OCM! ✨

🌱 Project Overview

This PR contributes the fleetconfig-controller project to the OCM community. The fleetconfig-controller introduces a new FleetConfig custom resource, which the controller orchestrates to manage the lifecycle of OCM multi-clusters. The controller is a lightweight wrapper around clusteradm. Anything you can accomplish imperatively via a series of clusteradm commands can now be accomplished declaratively using the fleetconfig-controller.

🔧 Installation

The controller is installed via Helm. By default the Helm chart will also produce a FleetConfig to orchestrate, however that behaviour can be disabled. To get started, check out the smoke tests. Within 10 minutes you can watch the fleetconfig-controller bootstrap two local kind clusters into an OCM hub and spoke.

🏗️ Support Matrix

  • Orchestration of OCM multi-clusters on any vanilla Kubernetes cluster is supported
  • Orchestration of managed Kubernetes clusters is partially supported
    • EKS and GKE are fully supported
    • Azure (AKS) is on our roadmap

@TylerGillson TylerGillson changed the title feat: initial commit for fleetconfig-controller; update GHAs feat: initial commit for fleetconfig-controller Jun 19, 2025
@TylerGillson TylerGillson force-pushed the feat/fleetconfig-controller branch 2 times, most recently from 6b4d8b8 to c2546d9 Compare June 20, 2025 02:33
Signed-off-by: Mike Ng <ming@redhat.com>
… repo

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
@TylerGillson TylerGillson changed the title feat: initial commit for fleetconfig-controller feat: OCM fleetconfig-controller for declarative multi-cluster orchestration Jun 20, 2025
@TylerGillson TylerGillson changed the title feat: OCM fleetconfig-controller for declarative multi-cluster orchestration feat: fleetconfig-controller for declarative orchestration of OCM multi-clusters Jun 20, 2025
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
@TylerGillson TylerGillson marked this pull request as ready for review June 20, 2025 21:57
@openshift-ci openshift-ci bot requested review from jnpacker and mikeshng June 20, 2025 21:57
@TylerGillson
Copy link
Collaborator Author

I had to make a bunch of assumptions around CI for the labs monorepo. I would appreciate input on the release and releaseimage workflows 🙏 (also on the whole PR in general 😄)

At the moment I have assumed that the following secrets will be added to this repository:

  • OCM_BOT_PAT
  • DOCKER_PASSWORD
  • DOCKER_USER

The smoke tests are passing for me locally, so hopefully they’ll pass for you too.

Heads up that I will be away for all of next week. But I will get on any feedback ASAP once I return on the 30th.

@mikeshng
Copy link
Member

CC @qiujian16 @xuezhaojun

@xuezhaojun xuezhaojun mentioned this pull request Jun 23, 2025
@qiujian16
Copy link
Member

thanks, looks fine in general. I would suggest we remove github action related for now. There will be multiple project in it and we have to figure out a more generic approach with gha

@mikeshng
Copy link
Member

@TylerGillson do you have any recommendation on a generic approach with GitHub Actions?

@TylerGillson
Copy link
Collaborator Author

@mikeshng the approach I've proposed here is a generic approach for handling CI for multiple subprojects. Each project just has to conform to a handful of requirements that I've outlined in the top-level README.


From README.md:

GitHub Actions

All projects must follow certain conventions to ensure compatibility with the lab repository's Github Actions workflows.

Refer to the Test and E2E workflows for exact details.

make targets

All projects must define the following make targets:

  • check-diff: Perform any automated formatting, Helm chart README updates, manifest generation, etc. Return a non-zero exit code if a git diff is produced.
  • test-e2e: Invoke end-to-end tests and return an exit code accordingly.
  • test-unit: Invoke unit tests and return an exit code accordingly.

Dockerfiles

All Dockerfiles for the project must reside under <project_name>/build/ and the default Dockerfile must be named Dockerfile.base.

Helm Charts

Any projects that require a Helm chart must be structured as follows:

<project_name>
└── charts
    └── <project_name> # chart name must match project directory name
        ├── Chart.yaml
        ├── templates
        └── values.yaml

Furthermore, values.yaml must contain the following top-level values:

image:
  repository: <project_image_repository>
  tag: <project_image_tag>

This is required so that a locally built image can be used consistently for Helm chart testing.

See the test-chart job in the Test workflow for further details.

@TylerGillson
Copy link
Collaborator Author

TylerGillson commented Jun 30, 2025

Would you like me to remove the vendor folder temporarily so that the PR can actually be reviewed on the Github UI? I can add it back later on once other feedback is addressed.

@mikeshng I'd be happy to set up an in-person meeting to review this PR with yourself and whoever else is interested/required.

I've set up the Github workflows to handle the monorepo structure in a reasonably straightforward manner. I'd be happy to replace the bash + jq logic in planner.yml with a python script if that would be preferable.

TylerGillson and others added 10 commits June 30, 2025 15:14
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
…ml (#2)

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
@TylerGillson TylerGillson force-pushed the feat/fleetconfig-controller branch from 42d67f3 to fa88b66 Compare July 1, 2025 15:44
TylerGillson and others added 5 commits July 1, 2025 10:07
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
…etry if AMW exists (#3)

Signed-off-by: Artur Shad Nik <37195151+arturshadnik@users.noreply.github.com>
* chore: bump clusteradm version to v1.0.0
* chore: bump bundleVersion in values.yaml to v1.0.0
* chore: bump OCM_VERSION adn CLUSTERADM_VERSION in .versions.env
* chore: make reviewable

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
@TylerGillson TylerGillson force-pushed the feat/fleetconfig-controller branch from 9812142 to fecb725 Compare July 1, 2025 17:27
Copy link
Member

@mikeshng mikeshng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

/assign @qiujian16

@qiujian16
Copy link
Member

/approve

let's merge this as a good starting point. I'd like @xuezhaojun to also review the project onboarding part, but we can iterate on it later. Thanks for this great work!

@openshift-ci
Copy link

openshift-ci bot commented Jul 3, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiujian16, TylerGillson

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

@openshift-ci openshift-ci bot added the approved label Jul 3, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 447e56d into open-cluster-management-io:main Jul 3, 2025
9 of 10 checks passed
@TylerGillson TylerGillson deleted the feat/fleetconfig-controller branch July 22, 2025 20:25
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.

7 participants