Skip to content

[WIP] Implement cluster registration workflows via Shepherd/golang#155

Open
git-ival wants to merge 55 commits intorancher:mainfrom
git-ival:cluster-registration-overhaul
Open

[WIP] Implement cluster registration workflows via Shepherd/golang#155
git-ival wants to merge 55 commits intorancher:mainfrom
git-ival:cluster-registration-overhaul

Conversation

@git-ival
Copy link
Member

Features:

  • "Natural" sorting of slices based on some string contained in each element
    • Currently used for imported downstream_cluster_templates to trigger import cluster registration workflow in-order based on name
  • Batched, sequential and concurrent cluster registration
    • Imported Clusters: fully functional
    • Provisioned Clusters: implemented, not yet tested
    • Custom Clusters: fully functional
  • Idempotency for all cluster registrations via custom state handling logic within dartboard
    • Uses the newly-introduced ClusterStatus struct that contains basic state information for each Cluster that has been sent to the cluster registration batch runner
  • Currently functional for Harvester envs, AWS envs need further tuning to be considered fully functional

Closes #72

Copy link

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

This PR implements cluster registration workflows via Shepherd/golang, enabling batch processing of imported, provisioned, and custom Kubernetes clusters with idempotent state management.

Key changes:

  • Introduces custom cluster support with machine pool configurations and validation
  • Implements concurrent batch runner with state persistence for cluster registration
  • Removes context.Context parameters from tofu functions, adds state management infrastructure

Reviewed changes

Copilot reviewed 44 out of 45 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tofu/modules/harvester/node/outputs.tf Renamed output from public_address to public_ip for consistency
tofu/modules/generic/test_environment/variables.tf Added custom cluster support with machine pools and validations
internal/tofu/tofu.go Refactored to remove context parameters, added custom cluster types and helper functions
internal/actions/batchrunner.go New concurrent batch runner for cluster operations with state management
internal/actions/rancher.go New cluster registration workflows (import, provision, register custom)
internal/actions/handlestate.go New state persistence for cluster registration idempotency
internal/harvester/* New package ported from harvester-cli for VM management
internal/dart/recipe.go Extended with cluster template and config types
cmd/dartboard/subcommands/* Updated CLI to support new workflows with skip flags

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…dling logic within dartboard, add kubeconfig parsing support, add shepherd as dependency
… pointer issues on append, add concurrency handling to speed up batch processing, add yaml struct tags
…SequencedBatchRunner struct to handle all the logic
…enable handling of both imported and provisioned cluster flows
@git-ival git-ival force-pushed the cluster-registration-overhaul branch from cd141b7 to f2723f8 Compare January 14, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor cluster registration workflow

2 participants