Skip to content

feat(fleet): add pipeline-based management cluster registration#5436

Merged
openshift-merge-bot[bot] merged 7 commits into
Azure:mainfrom
geoberle:fleet-registration
May 30, 2026
Merged

feat(fleet): add pipeline-based management cluster registration#5436
openshift-merge-bot[bot] merged 7 commits into
Azure:mainfrom
geoberle:fleet-registration

Conversation

@geoberle
Copy link
Copy Markdown
Collaborator

@geoberle geoberle commented May 29, 2026

Adds the fleet register CLI command and its pipeline integration, and removes the ManagementClusterMigrationController

The register command writes Stamp and ManagementCluster documents directly to CosmosDB during management cluster provisioning — the same data the migration controller previously synced from ClustersService, but driven from the pipeline instead.

What this PR does:

  • fleet register subcommand that creates/updates Stamp and ManagementCluster documents in CosmosDB
  • Registration pipeline (fleet/registration/) that runs the command as a Kubernetes Job during management cluster provisioning
  • Deterministic provision shard ID generation via UUID v5 same namespace UUID and AKS cluster name as the existing cluster-service Makefile, so both paths always produce the same ID
  • Removes the ManagementClusterMigrationController from the backend -— the register command now owns Stamp and ManagementCluster document creation
  • AdminAPI endpoint for fleet data access + E2E test validating registration succeeded

What this PR does NOT touch:

  • ClustersService provision shard registration (still helm-based)
  • Maestro consumer registration (still via maestro agent job)
  • These will move to fleet controllers in follow-up PRs

https://redhat.atlassian.net/browse/ARO-26925

Testing

The Fleet should have registered stamps with ready management clusters E2E test verifies that registration succeeded and an approved stamp and ready mgmt cluster are available in cosmos DB.

Special notes for your reviewer

PR Checklist

  • PR is scoped to a single task (no mixed concerns)
  • Title follows Conventional Commits format
  • Summary explains the "Why" behind the change
  • Linked to relevant ticket/issue
  • Screenshots included (if graph/UI/metrics changes)
  • Self-reviewed the diff
  • CI/CD checks are passing (ignore Tide)
  • Draft PR used for WIP (if applicable)
  • Commit history is clean (rebased/squashed)
  • Tricky code blocks are commented
  • Specific reviewers tagged
  • All comment threads resolved before merge

Copilot AI review requested due to automatic review settings May 29, 2026 10:01
@openshift-ci openshift-ci Bot requested review from bennerv and mbarnes May 29, 2026 10:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds pipeline-driven fleet registration so management cluster provisioning creates/updates Fleet Stamp and ManagementCluster records in CosmosDB, replacing the backend migration controller path.

Changes:

  • Adds fleet register CLI command and Helm Job/pipeline integration.
  • Adds config/schema support for stamp auto-approval.
  • Removes the backend ManagementClusterMigration controller and tests.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
topology.yaml Adds Fleet Registration as a management child service group.
fleet/registration/Chart.yaml Defines the new registration Helm chart.
fleet/registration/values.yaml Provides Helm values for the registration Job.
fleet/registration/templates/registration.job.yaml Renders the Kubernetes Job that runs fleet register.
fleet/registration/pipeline.yaml Adds the rollout pipeline for registration.
fleet/registration/zz_fixture_TestHelmTemplate_dev_westus3_svc_1_fleet_reg_dev_westus3_mgmt_1.yaml Adds rendered Helm fixture output.
fleet/main.go Wires the new register subcommand.
fleet/cmd/register/options.go Adds CLI options, validation, and DB client completion.
fleet/cmd/register/cmd.go Implements Stamp and ManagementCluster registration writes.
config/config.yaml Adds default fleet registration config.
config/config.schema.json Adds schema for fleet registration config.
config/rendered/dev/ci01/centralus.yaml Updates rendered dev config.
config/rendered/dev/cspr/westus3.yaml Updates rendered dev config.
config/rendered/dev/dev/westus3.yaml Updates rendered dev config.
config/rendered/dev/perf/westus3.yaml Updates rendered dev config.
config/rendered/dev/pers/westus3.yaml Updates rendered dev config.
config/rendered/dev/prow/centralus.yaml Updates rendered dev config.
backend/pkg/app/backend.go Stops constructing/running the migration controller.
backend/pkg/controllers/managementclustercontrollers/management_cluster_migration.go Removes migration controller implementation.
backend/pkg/controllers/managementclustercontrollers/management_cluster_migration_test.go Removes migration controller tests.

Comment thread fleet/registration/values.yaml Outdated
Comment thread fleet/cmd/register/cmd.go Outdated
Comment thread fleet/cmd/register/cmd.go Outdated
Comment thread fleet/cmd/register/cmd.go
@geoberle geoberle force-pushed the fleet-registration branch 2 times, most recently from ecf1f70 to fc2cf07 Compare May 29, 2026 10:38
Copilot AI review requested due to automatic review settings May 29, 2026 10:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.

Comment thread fleet/registration/values.yaml Outdated
Comment thread fleet/registration/values.yaml Outdated
Comment thread fleet/cmd/register/options.go
@geoberle geoberle force-pushed the fleet-registration branch from fc2cf07 to f6568bb Compare May 29, 2026 10:50
Adds the fleet register CLI command and its pipeline integration, and
removes the ManagementClusterMigrationController

https://redhat.atlassian.net/browse/ARO-26925

The register command writes Stamp and ManagementCluster documents directly to
CosmosDB during management cluster provisioning — the same data the migration
controller previously synced from ClustersService, but driven from the
pipeline instead.

What this PR does:

- fleet register subcommand that creates/updates Stamp and
  ManagementCluster documents in CosmosDB
- Registration pipeline (fleet/registration/) that runs the
  command as a Kubernetes Job during management cluster
  provisioning
- Deterministic provision shard ID generation via UUID v5
  same namespace UUID and AKS cluster name as the existing
  cluster-service Makefile, so both paths always produce the
  same ID
- Removes the ManagementClusterMigrationController from the
  backend — the register command now owns Stamp and
  ManagementCluster document creation

What this PR does NOT touch:

- ClustersService provision shard registration (still
  helm-based)
- Maestro consumer registration (still via maestro agent
  job)
- These will move to fleet controllers in follow-up PRs

What this PR does NOT touch:

- ClustersService provision shard registration (still helm-based)
- Maestro consumer registration (still via maestro agent job)
- These will move to fleet controllers in follow-up PRs
Copilot AI review requested due to automatic review settings May 29, 2026 11:00
@geoberle geoberle force-pushed the fleet-registration branch from f6568bb to a33747b Compare May 29, 2026 11:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.

Comment thread fleet/cmd/register/cmd_test.go
Copilot AI review requested due to automatic review settings May 29, 2026 13:48
@geoberle geoberle force-pushed the fleet-registration branch from 819efc6 to afe99ab Compare May 29, 2026 13:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 37 out of 38 changed files in this pull request and generated 2 comments.

Comment thread fleet/cmd/register/cmd.go
Comment thread test/go.mod Outdated
@geoberle geoberle force-pushed the fleet-registration branch 2 times, most recently from e62140f to b3d7246 Compare May 29, 2026 14:08
Copilot AI review requested due to automatic review settings May 29, 2026 14:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 37 out of 37 changed files in this pull request and generated 1 comment.

Comment thread fleet/cmd/register/cmd.go
@geoberle geoberle force-pushed the fleet-registration branch from b3d7246 to d321241 Compare May 29, 2026 14:28
@geoberle
Copy link
Copy Markdown
Collaborator Author

/test e2e-parallel

Comment thread config/config.schema.json
Signed-off-by: Gerd Oberlechner <goberlec@redhat.com>
Copilot AI review requested due to automatic review settings May 30, 2026 06:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 38 out of 38 changed files in this pull request and generated 1 comment.

Comment thread admin/server/handlers/stamp/stamp_get.go Outdated
@geoberle
Copy link
Copy Markdown
Collaborator Author

/test verify

@geoberle geoberle closed this May 30, 2026
@geoberle geoberle reopened this May 30, 2026
Comment thread admin/server/handlers/stamp/managementcluster.go
Comment thread admin/server/handlers/stamp/managementcluster.go Outdated
Comment thread admin/server/handlers/stamp/stamp.go Outdated
Comment thread admin/server/handlers/stamp/stamp.go Outdated
Comment thread fleet/cmd/register/cmd.go Outdated
Comment thread fleet/cmd/register/options.go
Comment thread fleet/cmd/register/options.go
Comment thread fleet/cmd/register/options.go
Copilot AI review requested due to automatic review settings May 30, 2026 17:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 43 out of 43 changed files in this pull request and generated no new comments.

Copy link
Copy Markdown
Member

@bennerv bennerv left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 30, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bennerv, geoberle

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

The pull request process is described here

Details 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-merge-bot
Copy link
Copy Markdown
Contributor

/retest-required

Remaining retests: 0 against base HEAD cfa46fa and 2 for PR HEAD ca0879b in total

@openshift-merge-bot openshift-merge-bot Bot merged commit 99dcb99 into Azure:main May 30, 2026
15 checks passed
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.

4 participants