fix(metrics): announce sidecar injection capability#776
Merged
mnencia merged 1 commit intocloudnative-pg:mainfrom Mar 31, 2026
Merged
fix(metrics): announce sidecar injection capability#776mnencia merged 1 commit intocloudnative-pg:mainfrom
mnencia merged 1 commit intocloudnative-pg:mainfrom
Conversation
21b45e9 to
c433889
Compare
GabriFedi97
approved these changes
Mar 30, 2026
Member
|
proposed commit: fix(identity): add sidecar injection capability to operator The operator plugin was not advertising the TYPE_INSTANCE_SIDECAR_INJECTION |
armru
approved these changes
Mar 30, 2026
mnencia
approved these changes
Mar 31, 2026
The operator was not announcing the TYPE_INSTANCE_SIDECAR_INJECTION capability so the CNPG operator was not considering the plugin enabled. However, this bug was masked if you had set `isWALArchiver` to `true` in your config, the backward compatibility code was marking the plugin as enabled as a side-effect. Signed-off-by: Kenny Root <kenny@the-b.org>
mnencia
approved these changes
Mar 31, 2026
Member
mnencia
left a comment
There was a problem hiding this comment.
The fix correctly adds TYPE_INSTANCE_SIDECAR_INJECTION to the advertised plugin capabilities. This is backed by the existing OperatorLifecycleServer implementation which already handles pod mutation and sidecar injection via lifecycle hooks. The missing capability was preventing the CNPG operator from considering the plugin enabled, which in turn broke metrics collection for users with isWALArchiver: false.
mnencia
pushed a commit
that referenced
this pull request
Apr 14, 2026
🤖 I have created a release *beep* *boop* --- ## [0.12.0](v0.11.0...v0.12.0) (2026-04-13) ### Features * **deps:** Update dependency barman to v3.18.0 ([#813](#813)) ([a8b446f](a8b446f)) ### Bug Fixes * **deps:** Update all non-major go dependencies ([#751](#751)) ([5001fe7](5001fe7)) * **deps:** Update all non-major go dependencies ([#757](#757)) ([d031c23](d031c23)) * **deps:** Update all non-major go dependencies ([#801](#801)) ([6ae101f](6ae101f)) * **deps:** Update dependency @easyops-cn/docusaurus-search-local to ^0.55.0 ([#753](#753)) ([60d32cc](60d32cc)) * **deps:** Update documentation dependencies ([#833](#833)) ([e1d4a6e](e1d4a6e)) * **deps:** Update k8s.io/utils digest to 28399d8 ([#829](#829)) ([3549e26](3549e26)) * **deps:** Update k8s.io/utils digest to b8788ab ([#784](#784)) ([f64ff8e](f64ff8e)) * **deps:** Update kubernetes packages to v0.35.2 ([#788](#788)) ([a7e28f6](a7e28f6)) * **deps:** Update module github.com/cert-manager/cert-manager to v1.19.3 [security] ([#775](#775)) ([79238f5](79238f5)) * **deps:** Update module github.com/cert-manager/cert-manager to v1.20.2 ([#844](#844)) ([441f43b](441f43b)) * **deps:** Update module github.com/cloudnative-pg/api to v1.29.0 ([#837](#837)) ([09181b0](09181b0)) * **deps:** Update module github.com/cloudnative-pg/machinery to v0.4.0 ([#850](#850)) ([18e3888](18e3888)) * **deps:** Update module google.golang.org/grpc to v1.79.3 [security] ([#819](#819)) ([376e178](376e178)) * **deps:** Update module sigs.k8s.io/controller-runtime to v0.23.3 ([#789](#789)) ([3f726ea](3f726ea)) * **deps:** Update module sigs.k8s.io/kustomize/api to v0.21.1 ([#790](#790)) ([84a388e](84a388e)) * **metrics:** Announce sidecar injection capability ([#776](#776)) ([4a94cb9](4a94cb9)) * **rbac:** Reconcile Role when ObjectStore spec changes ([#823](#823)) ([8971a39](8971a39)) * **restore:** Race condition in parallel WAL restore spool ([#812](#812)) ([25d72ce](25d72ce)) * **restore:** Use custom CNPG group and version for scheme registration ([#847](#847)) ([b1f373d](b1f373d)) * **security:** Harden GitHub Actions workflows against expression injection ([#773](#773)) ([ce7b761](ce7b761)) * Skip maintenance cycle when plugin is not enabled for backups ([#826](#826)) ([63a67cb](63a67cb)), closes [#774](#774) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Signed-off-by: Peggie <info@cloudnative-pg.io>
renovate Bot
added a commit
to sdwilsh/ansible-playbooks
that referenced
this pull request
Apr 16, 2026
…v0.12.0 ##### [\`v0.12.0\`](https://github.com/cloudnative-pg/plugin-barman-cloud/releases/tag/v0.12.0) ##### Features - **deps:** Update dependency barman to v3.18.0 ([#813](cloudnative-pg/plugin-barman-cloud#813)) ([a8b446f](cloudnative-pg/plugin-barman-cloud@a8b446f)) ##### Bug Fixes - **deps:** Update all non-major go dependencies ([#751](cloudnative-pg/plugin-barman-cloud#751)) ([5001fe7](cloudnative-pg/plugin-barman-cloud@5001fe7)) - **deps:** Update all non-major go dependencies ([#757](cloudnative-pg/plugin-barman-cloud#757)) ([d031c23](cloudnative-pg/plugin-barman-cloud@d031c23)) - **deps:** Update all non-major go dependencies ([#801](cloudnative-pg/plugin-barman-cloud#801)) ([6ae101f](cloudnative-pg/plugin-barman-cloud@6ae101f)) - **deps:** Update dependency [@easyops-cn/docusaurus-search-local](https://github.com/easyops-cn/docusaurus-search-local) to ^0.55.0 ([#753](cloudnative-pg/plugin-barman-cloud#753)) ([60d32cc](cloudnative-pg/plugin-barman-cloud@60d32cc)) - **deps:** Update documentation dependencies ([#833](cloudnative-pg/plugin-barman-cloud#833)) ([e1d4a6e](cloudnative-pg/plugin-barman-cloud@e1d4a6e)) - **deps:** Update k8s.io/utils digest to [`28399d8`](cloudnative-pg/plugin-barman-cloud@28399d8) ([#829](cloudnative-pg/plugin-barman-cloud#829)) ([3549e26](cloudnative-pg/plugin-barman-cloud@3549e26)) - **deps:** Update k8s.io/utils digest to [`b8788ab`](cloudnative-pg/plugin-barman-cloud@b8788ab) ([#784](cloudnative-pg/plugin-barman-cloud#784)) ([f64ff8e](cloudnative-pg/plugin-barman-cloud@f64ff8e)) - **deps:** Update kubernetes packages to v0.35.2 ([#788](cloudnative-pg/plugin-barman-cloud#788)) ([a7e28f6](cloudnative-pg/plugin-barman-cloud@a7e28f6)) - **deps:** Update module github.com/cert-manager/cert-manager to v1.19.3 \[security] ([#775](cloudnative-pg/plugin-barman-cloud#775)) ([79238f5](cloudnative-pg/plugin-barman-cloud@79238f5)) - **deps:** Update module github.com/cert-manager/cert-manager to v1.20.2 ([#844](cloudnative-pg/plugin-barman-cloud#844)) ([441f43b](cloudnative-pg/plugin-barman-cloud@441f43b)) - **deps:** Update module github.com/cloudnative-pg/api to v1.29.0 ([#837](cloudnative-pg/plugin-barman-cloud#837)) ([09181b0](cloudnative-pg/plugin-barman-cloud@09181b0)) - **deps:** Update module github.com/cloudnative-pg/machinery to v0.4.0 ([#850](cloudnative-pg/plugin-barman-cloud#850)) ([18e3888](cloudnative-pg/plugin-barman-cloud@18e3888)) - **deps:** Update module google.golang.org/grpc to v1.79.3 \[security] ([#819](cloudnative-pg/plugin-barman-cloud#819)) ([376e178](cloudnative-pg/plugin-barman-cloud@376e178)) - **deps:** Update module sigs.k8s.io/controller-runtime to v0.23.3 ([#789](cloudnative-pg/plugin-barman-cloud#789)) ([3f726ea](cloudnative-pg/plugin-barman-cloud@3f726ea)) - **deps:** Update module sigs.k8s.io/kustomize/api to v0.21.1 ([#790](cloudnative-pg/plugin-barman-cloud#790)) ([84a388e](cloudnative-pg/plugin-barman-cloud@84a388e)) - **metrics:** Announce sidecar injection capability ([#776](cloudnative-pg/plugin-barman-cloud#776)) ([4a94cb9](cloudnative-pg/plugin-barman-cloud@4a94cb9)) - **rbac:** Reconcile Role when ObjectStore spec changes ([#823](cloudnative-pg/plugin-barman-cloud#823)) ([8971a39](cloudnative-pg/plugin-barman-cloud@8971a39)) - **restore:** Race condition in parallel WAL restore spool ([#812](cloudnative-pg/plugin-barman-cloud#812)) ([25d72ce](cloudnative-pg/plugin-barman-cloud@25d72ce)) - **restore:** Use custom CNPG group and version for scheme registration ([#847](cloudnative-pg/plugin-barman-cloud#847)) ([b1f373d](cloudnative-pg/plugin-barman-cloud@b1f373d)) - **security:** Harden GitHub Actions workflows against expression injection ([#773](cloudnative-pg/plugin-barman-cloud#773)) ([ce7b761](cloudnative-pg/plugin-barman-cloud@ce7b761)) - Skip maintenance cycle when plugin is not enabled for backups ([#826](cloudnative-pg/plugin-barman-cloud#826)) ([63a67cb](cloudnative-pg/plugin-barman-cloud@63a67cb)), closes [#774](cloudnative-pg/plugin-barman-cloud#774)
sdwilsh
pushed a commit
to sdwilsh/ansible-playbooks
that referenced
this pull request
Apr 17, 2026
…v0.12.0 ##### [\`v0.12.0\`](https://github.com/cloudnative-pg/plugin-barman-cloud/releases/tag/v0.12.0) ##### Features - **deps:** Update dependency barman to v3.18.0 ([#813](cloudnative-pg/plugin-barman-cloud#813)) ([a8b446f](cloudnative-pg/plugin-barman-cloud@a8b446f)) ##### Bug Fixes - **deps:** Update all non-major go dependencies ([#751](cloudnative-pg/plugin-barman-cloud#751)) ([5001fe7](cloudnative-pg/plugin-barman-cloud@5001fe7)) - **deps:** Update all non-major go dependencies ([#757](cloudnative-pg/plugin-barman-cloud#757)) ([d031c23](cloudnative-pg/plugin-barman-cloud@d031c23)) - **deps:** Update all non-major go dependencies ([#801](cloudnative-pg/plugin-barman-cloud#801)) ([6ae101f](cloudnative-pg/plugin-barman-cloud@6ae101f)) - **deps:** Update dependency [@easyops-cn/docusaurus-search-local](https://github.com/easyops-cn/docusaurus-search-local) to ^0.55.0 ([#753](cloudnative-pg/plugin-barman-cloud#753)) ([60d32cc](cloudnative-pg/plugin-barman-cloud@60d32cc)) - **deps:** Update documentation dependencies ([#833](cloudnative-pg/plugin-barman-cloud#833)) ([e1d4a6e](cloudnative-pg/plugin-barman-cloud@e1d4a6e)) - **deps:** Update k8s.io/utils digest to [`28399d8`](cloudnative-pg/plugin-barman-cloud@28399d8) ([#829](cloudnative-pg/plugin-barman-cloud#829)) ([3549e26](cloudnative-pg/plugin-barman-cloud@3549e26)) - **deps:** Update k8s.io/utils digest to [`b8788ab`](cloudnative-pg/plugin-barman-cloud@b8788ab) ([#784](cloudnative-pg/plugin-barman-cloud#784)) ([f64ff8e](cloudnative-pg/plugin-barman-cloud@f64ff8e)) - **deps:** Update kubernetes packages to v0.35.2 ([#788](cloudnative-pg/plugin-barman-cloud#788)) ([a7e28f6](cloudnative-pg/plugin-barman-cloud@a7e28f6)) - **deps:** Update module github.com/cert-manager/cert-manager to v1.19.3 \[security] ([#775](cloudnative-pg/plugin-barman-cloud#775)) ([79238f5](cloudnative-pg/plugin-barman-cloud@79238f5)) - **deps:** Update module github.com/cert-manager/cert-manager to v1.20.2 ([#844](cloudnative-pg/plugin-barman-cloud#844)) ([441f43b](cloudnative-pg/plugin-barman-cloud@441f43b)) - **deps:** Update module github.com/cloudnative-pg/api to v1.29.0 ([#837](cloudnative-pg/plugin-barman-cloud#837)) ([09181b0](cloudnative-pg/plugin-barman-cloud@09181b0)) - **deps:** Update module github.com/cloudnative-pg/machinery to v0.4.0 ([#850](cloudnative-pg/plugin-barman-cloud#850)) ([18e3888](cloudnative-pg/plugin-barman-cloud@18e3888)) - **deps:** Update module google.golang.org/grpc to v1.79.3 \[security] ([#819](cloudnative-pg/plugin-barman-cloud#819)) ([376e178](cloudnative-pg/plugin-barman-cloud@376e178)) - **deps:** Update module sigs.k8s.io/controller-runtime to v0.23.3 ([#789](cloudnative-pg/plugin-barman-cloud#789)) ([3f726ea](cloudnative-pg/plugin-barman-cloud@3f726ea)) - **deps:** Update module sigs.k8s.io/kustomize/api to v0.21.1 ([#790](cloudnative-pg/plugin-barman-cloud#790)) ([84a388e](cloudnative-pg/plugin-barman-cloud@84a388e)) - **metrics:** Announce sidecar injection capability ([#776](cloudnative-pg/plugin-barman-cloud#776)) ([4a94cb9](cloudnative-pg/plugin-barman-cloud@4a94cb9)) - **rbac:** Reconcile Role when ObjectStore spec changes ([#823](cloudnative-pg/plugin-barman-cloud#823)) ([8971a39](cloudnative-pg/plugin-barman-cloud@8971a39)) - **restore:** Race condition in parallel WAL restore spool ([#812](cloudnative-pg/plugin-barman-cloud#812)) ([25d72ce](cloudnative-pg/plugin-barman-cloud@25d72ce)) - **restore:** Use custom CNPG group and version for scheme registration ([#847](cloudnative-pg/plugin-barman-cloud#847)) ([b1f373d](cloudnative-pg/plugin-barman-cloud@b1f373d)) - **security:** Harden GitHub Actions workflows against expression injection ([#773](cloudnative-pg/plugin-barman-cloud#773)) ([ce7b761](cloudnative-pg/plugin-barman-cloud@ce7b761)) - Skip maintenance cycle when plugin is not enabled for backups ([#826](cloudnative-pg/plugin-barman-cloud#826)) ([63a67cb](cloudnative-pg/plugin-barman-cloud@63a67cb)), closes [#774](cloudnative-pg/plugin-barman-cloud#774)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The operator was not announcing the
TYPE_INSTANCE_SIDECAR_INJECTIONcapability, so the CNPG operator did not consider the plugin enabled for instance pods. As a result, the instance manager never queried the plugin's metrics endpoint, and the newbarman_cloud_cloudnative_pg_io_*metrics were missing entirely.This bug was masked when
isWALArchiverwas set totruein the plugin configuration, because the backward compatibility code in CNPG would mark the plugin as enabled as a side-effect. Users withisWALArchiver: false(or omitted) never saw the new metrics.The fix adds
TYPE_INSTANCE_SIDECAR_INJECTIONtoGetPluginCapabilities(), which is already backed by the existingOperatorLifecycleServerimplementation that handles pod mutation and sidecar injection via lifecycle hooks.Fixes #682