Status: Experimental
The CloudNativePG Interface (CNPG-I) introduces a modular and extensible approach to integrating plugins with the CloudNativePG operator for PostgreSQL, enabling greater flexibility and ease of feature development in the CloudNativePG ecosystem.
The CloudNativePG Interface is a gRPC-based protocol that defines a standardized interface between the CloudNativePG operator and external plugins. This approach empowers developers and organizations to extend the operator's functionality without the need to fork its codebase.
For a detailed protocol specification, refer to the protocol.md file.
Over the years, CloudNativePG's codebase has grown significantly, creating challenges for developers contributing to the project and increasing the time required to deliver new features.
To address this, CNPG-I provides a modular plugin architecture inspired by the success of Kubernetes' Container Storage Interface (CSI).
CNPG-I fosters a thriving ecosystem by making it easier to integrate new capabilities through independent plugins, allowing for faster innovation and simplified maintenance.
- Reduced Complexity: Delegate responsibilities to external plugins, reducing the cognitive load and size of the CloudNativePG core codebase.
- Faster Feature Delivery: Accelerate development by fostering independent plugin creation, prototyping, and ecosystem growth.
- Standardized gRPC API: Provide a robust, gRPC-based API specification for customizing operator and operand behavior, complete with compliance testing tools.
- Ecosystem Expansion: Encourage innovation by enabling developers to create enhancements as separate projects, avoiding forks and lowering barriers to entry.
- Ease of Adoption: Simplify the move to CloudNativePG for Postgres and Kubernetes users by facilitating custom enhancements and integrations.
CNPG-I enables the creation of plugins for diverse use cases, such as:
- WAL Management
- Backup and Recovery
- Logging and Auditing
- Metrics Export
- Authentication and Authorization
- Extension Management
- Instance Lifecycle Management
- Configuration Management
By leveraging plugins, developers can extend CloudNativePG’s functionality without modifying its core code.
Explore real-world applications of CNPG-I:
- CNPG-I Hello World: A simple example plugin demonstrating CNPG-I.
- Barman Cloud CNPG-I Plugin: A plugin for seamless integration with Barman Cloud for Continuous Backup and Recovery using object stores.
Postgres, PostgreSQL and the Slonik Logo are trademarks or registered trademarks of the PostgreSQL Community Association of Canada, and used with their permission.