fleetconfig-controller

module
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2025 License: Apache-2.0

README ΒΆ

✨ Unlock the power of GitOps for OCM! ✨

🌱 Project Overview

The fleetconfig-controller introduces a new FleetConfig custom resource to the OCM ecosystem. It reconciles FleetConfig resources to declaratively manage the lifecycle of Open Cluster Management (OCM) multi-clusters. The fleetconfig-controller will initialize an OCM hub and one or more spoke clusters; add, remove, and upgrade clustermanagers and klusterlets when their bundle versions change, manage their feature gates, and uninstall all OCM components properly whenever a FleetConfig is deleted.

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.

helm repo add ocm https://open-cluster-management.io/helm-charts
helm repo update ocm
helm install fleetconfig-controller ocm/fleetconfig-controller -n fleetconfig-system --create-namespace

By default the Helm chart will also produce a FleetConfig to orchestrate, however that behaviour can be disabled. Refer to the chart README for full documentation.

πŸ—οΈ Support Matrix

Support for orchestration of OCM multi-clusters varies based on the Kubernetes distribution and/or cloud provider.

Kubernetes Distribution Support Level
Vanilla Kubernetes βœ… Fully Supported
Amazon EKS βœ… Fully Supported
Google GKE βœ… Fully Supported
Azure AKS 🚧 On Roadmap

πŸƒπŸΌβ€β™‚οΈ Quick Start

Prerequisites
  • go version v1.22.0+
  • docker version 17.03+
  • kind version v0.23.0+
  • kubectl version v1.11.3+
Onboarding

To familiarize yourself with the FleetConfig API and the fleetconfig-controller, we recommend doing one or more of the following onboarding steps.

  1. Step through a smoke test

  2. Invoke the end-to-end tests and inspect the content of the kind clusters that the E2E suite automatically creates

    SKIP_CLEANUP=true make test-e2e
    

πŸ”£ Development

The fleetconfig-controller repository is pre-wired for development using DevSpace.

# Create a dev kind cluster
kind create cluster \
  --name fleetconfig-dev \
  --kubeconfig ~/Downloads/fleetconfig-dev.kubeconfig

export KUBECONFIG=~/Downloads/fleetconfig-dev.kubeconfig

# Initialize a devspace development container
devspace run-pipeline dev -n fleetconfig-system
Debugging
  • Hit up arrow, then enter from within the dev container to start a headless delve session

  • Use the following launch config to connect VSCode with the delve session running in the dev container:

    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "DevSpace",
                "type": "go",
                "request": "attach",
                "mode": "remote",
                "port": 2344,
                "host": "127.0.0.1",
                "substitutePath": [
                    {
                        "from": "${workspaceFolder}/fleetconfig-controller",
                        "to": "/workspace",
                    }
                ],
                "showLog": true,
                // "trace": "verbose", // useful for debugging delve (breakpoints not working, etc.)
            }
        ]
    }
    

Directories ΒΆ

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the fleetconfig v1alpha1 API group.
Package v1alpha1 contains API Schema definitions for the fleetconfig v1alpha1 API group.
Package main is the entrypoint for fleetconfig-controller
Package main is the entrypoint for fleetconfig-controller
internal
controller
Package controller contains the main reconciliation logic of fleetconfig-controller
Package controller contains the main reconciliation logic of fleetconfig-controller
exec
Package exec provides utility functions for executing commands.
Package exec provides utility functions for executing commands.
file
Package file contains file helpers
Package file contains file helpers
kube
Package kube contains helpers for interacting with a kubernetes cluster
Package kube contains helpers for interacting with a kubernetes cluster
test
Package test contains test utilities for the fleetconfig-controller project.
Package test contains test utilities for the fleetconfig-controller project.
version
Package version contains helpers for working with versions
Package version contains helpers for working with versions
pkg
common
Package common contains reusable helped functions
Package common contains reusable helped functions
test
e2e

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL