Skip to content

[Feature]: Chaos testing project #8174

Closed

Description

@gbartolini

Description

Currently, testing for CloudNativePG involves a series of unit tests that evaluate small components, as well as a comprehensive set of end-to-end tests that assess complete features, including responses to simulated failures. However, we lack a systematic approach to address failures that occur unexpectedly and randomly.

We want to expand the scope of our tests, introducing a full-fledged chaos testing framework that can better validate Cloudnativepg's resilience, fault tolerance, and recovery mechanisms.

By adopting chaos testing, we aim to:

  • Increase confidence that our services remain functional under adverse conditions.
  • Identify weak points that traditional testing may not uncover.

This self-contained project is perfect for the LFX Mentorship Program. The mentee can become a component owner of the project.

Expected outcomes

  • Selection of a Kubernetes-native chaos testing framework (e.g., LitmusChaos or Chaos Mesh).
  • Design and automation of an initial set of chaos experiments covering common failure scenarios.
  • Integration of these experiments into CI/CD to ensure reproducible testing.
  • Collection of clear observability metrics (e.g., failover time, data consistency) to assess resilience and recovery.
  • Documentation and guidelines to help contributors create and run new chaos experiments safely.

Recommended Skills

  • Experience with chaos testing frameworks (preferably LitmusChaos or Chaos Mesh).
  • Familiarity with Kubernetes, PostgreSQL, and CloudNativePG.
  • Understanding of observability tools such as Prometheus or Grafana.

Additional context

This should be a separate project under the CloudNativePG organisation.

Activity

  1. added this to the 1.28.0 milestone on Jul 29, 2025
  2. self-assigned this
    on Jul 29, 2025
  3. added theissue type on Jul 29, 2025
  4. added
    enhancement 🪄
    chore
    on Jul 29, 2025
  5. omsuneri commented on Aug 1, 2025

    @omsuneri
    Contributor

    @gbartolini i m interested in contributing this project any prerequisites ?

  6. alokdangre commented on Aug 2, 2025

    @alokdangre

    @gbartolini i would like to work on this project

  7. Divendra2006 commented on Aug 3, 2025

    @Divendra2006

    Hello @gbartolini ,

    As Divendra Yadav, a pre-final year student at IIT (BHU) selected for GSoC 2025 and I am incredibly excited to work with you on making CloudNativePG more resilient.

    I've been digging into the project details you sent over and have started mapping out a plan. My first step was to compare LitmusChaos and Chaos Mesh to decide which tool would be our foundation. After reviewing both, I have a clear recommendation.

    For our project, I believe LitmusChaos is the better choice because its entire framework is designed to help community contributors add new experiments, which is one of our key goals.

    With that in mind, here’s my proposed game plan:

    • Setup & Foundation: I'll start by setting up LitmusChaos in a dedicated test environment and getting familiar with its workflow.
    • Build Core Experiments: Next, I’ll dive into its Chaos Hub to implement critical tests, starting with scenarios like primary pod failure and network latency between nodes.
    • Measure and Automate: I'll then hook everything into Prometheus to measure recovery times and integrate the test suite into the CI/CD pipeline for automated, nightly runs.
    • Empower Contributors: Finally, I'll focus on creating clear documentation, especially a guide on how others can use the Litmus SDK to build and contribute their own new chaos experiments.
  8. swaparup36 commented on Aug 12, 2025

    @swaparup36

    Hi @gbartolini I am Swaparup,

    I’ve been working a lot with Postgres + Kubernetes in real-world setups, so this issue caught my eye. Looks like a solid starting point to dive into CloudNativePG internals. I’d love to pick this up as my first contribution and get hands-on with the operator logic.

    I’m looking to get started with a good first issue here — could you point me toward any existing discussions or notes so I can connect with whoever’s already exploring this?

  9. 11 remaining items

  10. github-actions commented on Dec 8, 2025

    @github-actions
    Contributor

    This issue was closed because it has been inactive for 14 days since being marked as stale.

  11. moved this from In Progress to Done in Security Mapon Dec 8, 2025
  12. moved this from In Progress to Done in Roadmapon Dec 8, 2025
  13. added a commit that references this issue on Dec 12, 2025
    3710ee5
  14. added a commit that references this issue on Dec 12, 2025
    114b106
  15. added 3 commits that reference this issue on Dec 12, 2025
    b974d8d
    c1356b2
    dd67e55
  16. added a commit that references this issue on Jan 20, 2026
    8cd4bcc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

LFX Mentorshipchoreenhancement 🪄no-stalesecurity 👮

Type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions