plugin-barman-cloud
plugin-barman-cloud copied to clipboard
Add lastArchivedWALTime to the RecoveryWindow status field from the ObjectStore
Summary
This PR adds tracking of the last successfully archived WAL file timestamp to the ObjectStore status and exposes it as a Prometheus metric.
Changes
- Added
LastArchivedWALTimefield to theRecoveryWindowstruct in the ObjectStore API - Updated WAL archive logic to record the timestamp after each successful archive operation
- Exposed a new metric in the instance metrics with this information for monitoring
- Updated the Makefile to use controller-gen v0.19.0 (matching the existing CRD files)
- Regenerated DeepCopy methods and CRD manifests
Motivation
This metric enables monitoring of WAL archiving activity, helps detect situations where WAL archiving may have stalled and also helps with setting the correct end limit for the recovery window - which is very important for backup and restore operations using the barman plugin.
Closes https://github.com/cloudnative-pg/plugin-barman-cloud/issues/629