Skip to content

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Elephant Ass Wiper

Elephant Ass Wiper

Automated hygiene for CloudNativePG.

Because replication happens. Sometimes it doesn't.

Elephant Ass Wiper (EAW) is a small, extensible, lifecycle-aware CloudNativePG diagnostic utility. It observes a CNPG cluster, classifies its lifecycle, and reports exactly how much it actually knows.

EAW is read-only. It never mutates a Kubernetes or a PostgreSQL resource.

Status

This repository is at M0 — Foundation. The CLI is executable and the domain model is independently testable. No remediation executor exists yet, and none is planned for M0. See docs/safety-contract.md for the invariants that a future executor must satisfy.

Build and qualification

make build     # build bin/eaw
make test      # run the mandatory offline test suites
make check     # the single authoritative qualification gate

make check requires only a Nim toolchain. It never contacts Kubernetes, PostgreSQL, S3 or any other network service.

Usage

eaw version                      # build identity and schema version
eaw list -A                      # discover CNPG clusters in every namespace
eaw list --context lab -n database
eaw inspect --context lab -n database postgres
eaw inspect --context lab -n database postgres --output json
eaw inspect --fixture tests/fixtures/healthy

The --fixture form runs the identical production assessment against a recorded observation, so the diagnostic logic can be qualified offline.

Exit codes

Code Meaning
0 Requested operation completed with sufficient evidence
1 Unexpected internal error
2 Invalid CLI arguments
3 Resource not found
4 Observation incomplete or unavailable
5 Unsupported compatibility contract

A degraded cluster is not an execution failure. It is reported with exit code 0 or 4, depending on whether the evidence was complete.

What EAW reports

EAW separates the Kubernetes topology health from the PostgreSQL replication and archive health. A cluster whose Pods are all Ready but whose replication telemetry was never collected is not reported as healthy:

{
  "topology_status": "healthy",
  "replication_status": "unknown",
  "archive_status": "unknown",
  "verdict": "investigation_required",
  "topology_evidence_complete": true,
  "replication_evidence_complete": false,
  "archive_evidence_complete": false,
  "observation_complete": false
}

The output never exaggerates the extent of the observed evidence. The completeness is reported per dimension, because a successful Kubernetes topology inspection says nothing about the PostgreSQL telemetry that M0 does not collect. observation_complete is therefore never true in M0: the overall health of a cluster cannot be asserted without replication and archive telemetry.

The observation schema is eaw.observation/v2. It was bumped from v1 because the completeness dimensions are new and the exit-code contract now distinguishes an unsupported contract (5) from an incomplete observation (4).

Documentation

Document Purpose
docs/architecture.md The functional core and the imperative shell
docs/safety-contract.md The future remediation invariants
docs/cnpg-compatibility.md CNPG version compatibility matrix
CONTRIBUTING.md How to contribute
AGENTS.md The engineering rules for automated agents

License

MIT. See LICENSE.

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages