Altinity / Altinity/clickhouse-operator
Clickhouse Operator Plugin Architecture
Open
Nobody has claimed this yet.
ongoing discussion
- Dominant language
- Go
- Stars
- 2.6k
- Forks
- 574
- Avg merge
- 8d 6h
- Merged PRs (30d)
- 6
Description
Introduction
- As the ClickHouse Operator matures, its codebase continues to grow—introducing complexity and slowing the delivery of new features like backup/restore, shard rebalancing and other critical capabilities.
- To address this, we propose introducing a plugin-based architecture—similar to CloudNativePG’s CNPG-I—enabling independent extensions to the operator through a well-defined interface.
- This approach allows the ClickHouse Operator to remain lightweight and focused, while empowering the community to innovate and extend functionality via external, modular plugins.
Goals
- Introduce a modular and extensible approach to integrate plugins with the Altinity Clickhouse operator, enabling greater flexibility and ease of feature development in the Clickhouse Operator ecosystem.
- Define a gRPC-based protocol that defines a standardized interface, named ClickhouseOperatorPlugin-Interface(COP-I), between the Altinity operator and external plugins.
- Empower developers and organizations to extend the operator's functionality without the need to fork its codebase.
Key Benefits
- Reduced Core Complexity: Offload auxiliary responsibilities—like backup orchestration or rebalancing logic—to external plugins, keeping the core operator clean and maintainable.
- Accelerated Feature Development: Enable faster delivery of features by allowing parallel plugin development without needing changes to the main operator.
- Standardized Plugin Interface: Define a gRPC API contract for plugins, enabling safe and consistent integration.
- Ecosystem Growth: Encourage external contributions by making it easier to build and share plugins, avoiding forks and duplication.
- Customization Without Forking: Support advanced user needs (e.g., custom backup tools) via pluggable extensions.
Use Cases for Plugins
- A modular ClickHouse Operator architecture would support plugins for: Backup and Restore (e.g., to S3)
- Shard Rebalancing and Resharding Strategies
- Cluster Lifecycle Hooks (pre/post scale, failover events)
- Integration with External Systems
Plugin Architecture
- The operator provides a gRPC service interface for all auxiliary features (e.g., backup, re-sharding).
- Each plugin implements the gRPC service for a specific feature.
- The plugin will be deployed separately from the operator
- The operator will discover the plugin using labels and annotations of the plugin’s K8s service
Block Diagram
The above diagram illustrates two plugins:
- Backup Plugin – Executes SQL commands on the ClickHouse cluster to back up data to S3.
- Resharding/Rebalance Plugin – Redistributes data across the ClickHouse cluster for load balancing.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the operator's current architecture and the proposed Kubernetes Service labels and annotations for plugin discovery. Define the COP-I gRPC contract, plugin deployment and discovery boundaries, and how backup or resharding plugins would integrate. Done means the architecture and interface are specified well enough to guide independent plugin implementations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, grpc, kubernetes, sql
- Domain
- backend-api-design, devops, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100