A Go library that provides a framework for developing addons for Open Cluster Management (OCM). This framework simplifies the process of creating, installing, and managing addons across multiple Kubernetes clusters in an OCM environment.
Open Cluster Management (OCM) is a Kubernetes-native solution for managing multiple clusters. The Addon Framework enables developers to build addons that can be deployed and managed across these clusters with minimal complexity. The framework handles addon lifecycle management, configuration, registration, and deployment patterns.
- Multiple Deployment Methods: Support for Go templates, Helm charts, and template-based deployments
- Lifecycle Management: Automated installation, upgrade, and removal of addons across managed clusters
- Configuration Management: Flexible configuration system supporting various configuration types
- Hosting Modes: Support for both standard and hosted deployment modes
- Registration Framework: Automatic addon registration with cluster management
- RBAC Integration: Built-in support for role-based access control
- Multi-cluster Support: Deploy addons across multiple managed clusters from a central hub
The framework is built around several key Kubernetes custom resources:
- ClusterManagementAddOn: Hub cluster resource that defines addon metadata and installation strategy
- ManagedClusterAddOn: Managed cluster resource that represents addon installation state
- AddOnTemplate: Template-based addon deployment without dedicated controllers
- One or more Kubernetes clusters
- Open Cluster Management installed and configured
- At least one managed cluster imported and accepted
Add the framework to your Go module:
go get open-cluster-management.io/addon-framework
The framework supports multiple addon implementation patterns:
- Go Template Based: Use Go templates to define addon resources
- Helm Chart Based: Deploy addons using Helm charts
- Template Based: Use AddOnTemplate for simplified deployment
- Hosted Mode: Run addon agents on hosting clusters
For detailed examples and tutorials, see the examples directory.
For comprehensive documentation on OCM addons, refer to:
- OCM Add-on Concepts - Core concepts and architecture
- OCM Add-on Developer Guide - Complete development guide
The repository includes several example addons:
- HelloWorld: Basic addon using Go templates
- HelloWorld Helm: Addon implemented with Helm charts
- HelloWorld Hosted: Addon with hosted deployment mode
- Kubernetes Dashboard: Real-world addon example
See examples/README.md for detailed instructions.
- cluster-proxy: Provides secure proxy access to managed clusters
- managed-serviceaccount: Manages service accounts across clusters
A collection of community addons including: AI integration, IoT layer, cluster proxy, telemetry, resource usage collection, and more.
We welcome contributions! Please see CONTRIBUTING.md for guidelines on how to contribute to this project.
For questions and support:
- Open an issue in this repository
- Join the Open Cluster Management community discussions