A Kubernetes operator for managing multi-cluster rollouts with support for ManifestWork and RevisionSet controllers.
For detailed documentation, see the docs folder.
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
- 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)
-
Clone the repository
git clone <repository-url> cd ocm-rollouts
-
Install CRDs
make install
-
Deploy the operator
make deploy
The operator supports running in different modes to enable selective controller functionality:
| Mode | Description | Controllers Enabled |
|---|---|---|
all (default) |
Runs both controllers | ManifestWorkRollout + RevisionSet |
manifestwork-rollout |
ManifestWorkRollout only | ManifestWorkRollout |
revisionset |
RevisionSet only | RevisionSet |
Option 1: Default deployment (all controllers)
kubectl apply -f config/manager/manager.yamlOption 2: ManifestWorkRollout mode only
kubectl apply -f config/manager/manager-manifestwork-rollout.yamlOption 3: RevisionSet mode only
kubectl apply -f config/manager/manager-revisionset.yamlOption 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'Run all controllers:
make runRun specific controller mode:
make run ARGS="--controller-mode=manifestwork-rollout"
make run ARGS="--controller-mode=revisionset"make buildmake testDeploy different controller types independently:
- Better resource isolation
- Independent scaling
- Separate monitoring and alerting
- Independent upgrades and rollbacks
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"| 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 |
The operator respects standard Kubernetes environment variables and can be configured using standard controller-runtime options.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Run
make testandmake lint - Submit a pull request