cncf / sandbox

Applications for Sandbox go here! ⏳📦🧪
Apache License 2.0
129 stars 21 forks source link

[Sandbox] CloudNativePG #128

Open gbartolini opened 4 days ago

gbartolini commented 4 days ago

Application contact emails

gabriele.bartolini@enterprisedb.com,leonardo.cecchi@enterprisedb.com,francesco.canovai@enterprisedb.com,marco.nenciarini@enterprisedb.com,armando.ruocco@enterprisedb.com,p.scorsolini@gmail.com,jonathan.gonzalez@enterprisedb.com

Project Summary

CloudNativePG is a Kubernetes native database platform for PostgreSQL

Project Description

CloudNativePG is a comprehensive platform designed to streamline the management of PostgreSQL databases within cloud-native environments based on Kubernetes. The main component is the CloudNativePG operator. CloudNativePG automates the entire lifecycle of PostgreSQL clusters—from deployment to maintenance—while ensuring high availability, disaster recovery, and self-healing capabilities. Built with a "security-by-default" mindset, it integrates advanced security measures, along with robust observability features like Prometheus metrics and Grafana dashboards for monitoring.

By adhering to Infrastructure as Code (IaC) principles, CloudNativePG enables users to define and manage PostgreSQL clusters through declarative configuration, simplifying complex tasks like automated failover, scaling, and backups. The CloudNativePG operator leverages Kubernetes-native resources, such as volume snapshots, to ensure consistent and reliable database operations.

CloudNativePG also extends its functionality with additional components, including kubectl plugins, Helm charts, and OLM bundles, ensuring seamless integration into existing cloud-native workflows. Furthermore, its extensibility framework (CNPG-I) supports third-party plugins, enabling users to adapt the platform to specific needs. CloudNativePG meets the growing demand for scalable, secure, and highly available database solutions in modern cloud environments, serving the basis for AI, ML and Analytics applications.

Org repo URL (provide if all repos under the org are in scope of the application)

https://github.com/cloudnative-pg

Project repo URL in scope of application

https://github.com/cloudnative-pg/cloudnative-pg

Additional repos in scope of the application

Website URL

https://cloudnative-pg.io/

Roadmap

https://github.com/orgs/cloudnative-pg/projects/1

Roadmap context

We currently maintain a concise list of features for implementation, preferring a just-in-time approach to selecting tasks for upcoming releases. This method allows us to adapt dynamically, choosing features based on community feedback and conversations with customers of our primary sponsoring organization.

Contributing Guide

https://github.com/cloudnative-pg/cloudnative-pg/blob/main/CONTRIBUTING.md

Code of Conduct (CoC)

https://github.com/cloudnative-pg/cloudnative-pg/blob/main/CODE_OF_CONDUCT.md

Adopters

https://github.com/cloudnative-pg/cloudnative-pg/blob/main/ADOPTERS.md

Contributing or Sponsoring Org

https://www.enterprisedb.com/

Maintainers file

https://github.com/cloudnative-pg/governance/blob/main/MAINTAINERS.md

IP Policy

Trademark and accounts

Why CNCF?

We believe that contributing our project to the CNCF will allow it to benefit from the CNCF’s extensive community support and expertise, especially in the realm of cloud-native technologies. The CNCF community offers diverse perspectives and a strong ecosystem of contributors that will help push Postgres' capabilities in cloud-native environments. This collaboration will enable Postgres to evolve further and excel in scenarios where Kubernetes and cloud-native deployments are integral, broadening its use cases in modern architectures.

The CNCF provides a powerful framework of open governance, and our project’s core values align with them. By integrating with CNCF, the CloudNativePG community will gain guidance and support in expanding our contributor base and ensuring long-term sustainability. CNCF’s model ensures that projects remain fully open-source, keeping the freedom and accessibility principles intact for users worldwide. Being part of CNCF guarantees that our project will be free and available to anyone, built on a stack composed of Kubernetes, Postgres, and CloudNativePG, fostering worldwide innovation.

We chose the CNCF because it provides not only an infrastructure for open governance but also a strong ecosystem of interconnected projects and working groups (SIGs and TAGs) within Kubernetes. The ability to collaborate with other CNCF projects, such as Prometheus, Fluent Bit/Fluentd, Helm, Open Policy Agent, and cert-manager, will help improve the overall user experience of running Postgres in cloud-native environments. Furthermore, given the criticality of storage in database systems, we are keen to improve Kubernetes storage and cooperate with CNCF storage-related projects such as Longhorn, Rook, and OpenEBS (currently archived). This synergy will strengthen both our project and the broader CNCF ecosystem by driving innovation in database management in Kubernetes-based deployments.

Benefit to the Landscape

CloudNativePG will bring a native, Kubernetes-friendly approach to managing PostgreSQL databases in cloud-native environments, which fills a critical gap in the CNCF ecosystem. PostgreSQL is one of the most widely used open-source relational databases, and CloudNativePG offers seamless integration with Kubernetes to manage its lifecycle, including high availability, disaster recovery, and backup/restore functionalities. By adding CloudNativePG to the CNCF landscape, the project addresses a growing need for database solutions that natively support cloud-native principles like declarative configuration, scalability, and automation.

CloudNativePG’s differentiating factor is its Kubernetes-native architecture, designed from the ground up for cloud-native PostgreSQL workloads. Unlike other database management tools, CloudNativePG is fully integrated with Kubernetes' operator pattern, leveraging its APIs and controllers for managing Postgres clusters in a reliable, automated, and self-healing manner. This approach significantly reduces operational complexity for running Postgres in Kubernetes, aligning with CNCF’s mission to simplify and promote cloud-native applications.

In terms of enhancements, CloudNativePG strengthens the CNCF landscape by integrating with existing CNCF projects like Prometheus for monitoring, cert-manager for managing certificates, and Kubernetes-native storage solutions such as Rook, Longhorn and OpenEBS (currently archived). This enhances the overall cloud-native ecosystem by offering a cohesive, unified solution for running PostgreSQL in Kubernetes, particularly in enterprise and large-scale production environments.

Cloud Native 'Fit'

CloudNativePG extends the Kubernetes API using custom resource definitions (CRDs) in an operator pattern. The Cluster CRD is key, managing highly available PostgreSQL clusters with scalability, self-healing, and automated failover features. It integrates seamlessly with standard Kubernetes resources (pods, services, persistent volume claims, etc.), promoting Kubernetes-native database management.

The project emphasizes declarative configuration, enabling users to manage PostgreSQL clusters as code through YAML manifests, Helm charts, or OLM bundles. This approach streamlines deployment and ensures consistent lifecycle management across environments, embodying the Infrastructure as Code (IaC) principle.

CloudNativePG also prioritizes observability, offering a customizable Prometheus exporter and exporting logs in JSON format. This allows integration with CNCF monitoring, alerting, and logging tools, providing real-time insights crucial for maintaining high availability in cloud-native environments.

Security is integral, following a "security by default" approach. It enforces best practices, including secure container policies and restricted PostgreSQL access, ensuring compliance in multi-cloud or hybrid setups.

Overall, CloudNativePG fits into the cloud-native landscape by providing a Kubernetes-native solution for PostgreSQL, emphasizing automation, observability, security, and declarative infrastructure.

Cloud Native 'Integration'

CloudNativePG depends:

  1. Kubernetes
  2. gRPC
  3. Helm (as an optional deployment method)
  4. Operator Framework (as an optional deployment method via OLM)

CloudNativePG possibly integrates with:

  1. Rook
  2. Longhorn
  3. OpenEBS (currently archived)
  4. Carina
  5. CubeFS
  6. ArgoCD
  7. Flux
  8. Prometheus
  9. Cortex
  10. Thanos
  11. FluentBit/Fluentd
  12. OpenTelemetry
  13. cert-manager
  14. Keycloak

Cloud Native Overlap

Currently, there is no overlap, as no CNCF project specifically manages PostgreSQL databases.

Similar projects

Vitess

Landscape

https://landscape.cncf.io/?item=app-definition-and-development--database--cloudnativepg

Business Product or Service to Project separation

This has already been addressed. EDB has donated the intellectual property (IP) to "The CloudNativePG Authors," and the project is licensed under Apache 2.0. Additionally, to avoid any potential trademark issues with the CNCF, the name "PostgreSQL" (a trademark of the PostgreSQL Community Association of Canada) has been removed from the project’s original name, which was initially "Cloud Native PostgreSQL."

Project presentations

Project champions

CNCF TAG Storage

Additional information

Running PostgreSQL in Kubernetes with CloudNativePG also contributes to the PostgreSQL project's growth and development. CloudNativePG enables seamless testing and integration of PostgreSQL's latest source code within Kubernetes, providing PostgreSQL developers with an efficient environment to test patches and new features. The project has already helped introduce a few patches and bug fixes to PostgreSQL, and the community actively supports DBAs looking to transition PostgreSQL deployments to Kubernetes.

ianstanton commented 1 day ago

Chiming in from https://tembo.io. We use CloudNativePG under the hood in our platform, and it's been excellent to work with. We're a small team, and we've been able to get a lot of value out of it. Working with @gbartolini and the team has been smooth, and they're always quick to respond to any questions we have.

We feel the admission of CNPG into the CNCF Sandbox will help fuel the growth of the project and the surrounding community. We're excited to see where it goes from here!

pgodowski commented 1 day ago

Chiming in from IBM. We use CloudNativePG as the embedded Postgres datastore for the wide portfolio of the IBM products running on Kubernetes/OpenShift platform across hybrid environments (customer-managed and running on Cloud). Working with the community, we appreciate CloudNativePG for its robustness and resiliency, delivering the value to the customers running Postgres database in thousands on Kubernetes clusters. The community is energetic, always helpful and always looking for the best way how to do things in the Kubernetes native way: @gbartolini @sxd @leonardoce and other fantastic community builders are great experts leading the efforts of making Postgres the first class citizen in the Kubernetes ecosystem.

Admission of CNPG into CNCF Sandbox would elevate this community to the next level. Happy to be part of this journey.

xing-yang commented 1 day ago

CloudNativePG team gave a presentation to TAG Storage on 9/25/2024. Here's the recording: https://www.youtube.com/watch?v=Nsu5Em8Ig88. cc @chira001 @raffaelespazzoli