Skip to content

Repository files navigation

Multi-Cluster Rollout Operator

A Kubernetes operator for managing multi-cluster rollouts with support for ManifestWork and RevisionSet controllers.

Documentation

For detailed documentation, see the docs folder.

Overview

The Multi-Cluster Rollout Operator provides two main controllers:

  • ManifestWorkRollout Controller: Manages rollout operations for ManifestWork resources
  • ManifestWorkRevisionSet Controller: Manages revision sets for controlled rollouts

Quick Start

Prerequisites

  • Go 1.21+
  • Kubernetes cluster
  • kubectl configured to access your cluster
  • Open Cluster Management components:
    • Hub cluster with OCM ClusterManager component installed
    • Klusterlet and Work agent running on spoke clusters (to pull ManifestWork and apply resources)

Installation

  1. Clone the repository

    git clone <repository-url>
    cd ocm-rollouts
  2. Install CRDs

    make install
  3. Deploy the operator

    make deploy

Controller Modes

The operator supports running in different modes to enable selective controller functionality:

Available Modes

Mode Description Controllers Enabled
all (default) Runs both controllers ManifestWorkRollout + RevisionSet
manifestwork-rollout ManifestWorkRollout only ManifestWorkRollout
revisionset RevisionSet only RevisionSet

Deployment Options

Option 1: Default deployment (all controllers)

kubectl apply -f config/manager/manager.yaml

Option 2: ManifestWorkRollout mode only

kubectl apply -f config/manager/manager-manifestwork-rollout.yaml

Option 3: RevisionSet mode only

kubectl apply -f config/manager/manager-revisionset.yaml

Option 4: Custom deployment Edit the deployment args in your YAML:

containers:
- command:
  - /manager
  args:
    - --leader-elect
    - --health-probe-bind-address=:8081
    - --controller-mode=manifestwork-rollout  # or 'revisionset' or 'all'

Development

Running locally

Run all controllers:

make run

Run specific controller mode:

make run ARGS="--controller-mode=manifestwork-rollout"
make run ARGS="--controller-mode=revisionset"

Building

make build

Testing

make test

Use Cases for Controller Modes

Separate Deployments

Deploy different controller types independently:

  • Better resource isolation
  • Independent scaling
  • Separate monitoring and alerting
  • Independent upgrades and rollbacks

Development and Testing

Test individual controllers during development:

# Test only ManifestWorkRollout functionality
make run ARGS="--controller-mode=manifestwork-rollout"

# Test only RevisionSet functionality  
make run ARGS="--controller-mode=revisionset"

Configuration

Command Line Arguments

Argument Default Description
--controller-mode all Controller mode: manifestwork-rollout, revisionset, or all
--leader-elect false Enable leader election
--health-probe-bind-address :8081 Health probe bind address
--metrics-bind-address 0 Metrics endpoint bind address

Environment Variables

The operator respects standard Kubernetes environment variables and can be configured using standard controller-runtime options.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Run make test and make lint
  6. Submit a pull request

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages