fix: emit event and log when ImageCatalog retrieval fails by armru · Pull Request #9266 · cloudnative-pg/cloudnative-pg
This PR changes 30-99 lines, ignoring generated files.
label
Nov 20, 2025Previously, if the ImageCatalog CRD was missing or another error occurred during retrieval (other than NotFound), the controller would fail silently without emitting a Kubernetes event. This made troubleshooting difficult, especially when using tools like ArgoCD. This commit ensures that a Warning event and a log is emitted when the ImageCatalog cannot be retrieved for any reason, providing better visibility into configuration errors. Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
cnpg-bot pushed a commit that referenced this pull request
Nov 25, 2025Previously we emitted error and logs only for the errors of NotFound category, for the other types the the controller would fail silently without emitting a Kubernetes event. This made troubleshooting difficult, especially when using tools like ArgoCD. This commit ensures that a Warning event and a log is emitted when the ImageCatalog cannot be retrieved for any reason, providing better visibility into configuration errors. Closes #9016 Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com> Signed-off-by: Jonathan Battiato <jonathan.battiato@enterprisedb.com> Co-authored-by: Jonathan Battiato <jonathan.battiato@enterprisedb.com> (cherry picked from commit 9a354b8)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters