From 4a94cb9daef6940ad425a7e349e51444ab92379c Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Tue, 31 Mar 2026 06:36:09 -0700 Subject: [PATCH] fix(metrics): announce sidecar injection capability (#776) The operator was not announcing the TYPE_INSTANCE_SIDECAR_INJECTION capability so the CNPG operator did not consider the plugin enabled for instance pods. The instance manager never queried the plugin's metrics endpoint, and the barman_cloud_cloudnative_pg_io_* metrics were missing entirely. This bug was masked when isWALArchiver was set to true in the plugin configuration, because the backward compatibility code in CNPG would mark the plugin as enabled as a side-effect. Users with isWALArchiver set to false (or omitted) never saw the new metrics. Closes #682 Signed-off-by: Kenny Root --- internal/cnpgi/operator/identity.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/cnpgi/operator/identity.go b/internal/cnpgi/operator/identity.go index 0d48a19..8e6ee13 100644 --- a/internal/cnpgi/operator/identity.go +++ b/internal/cnpgi/operator/identity.go @@ -62,6 +62,13 @@ func (i IdentityImplementation) GetPluginCapabilities( }, }, }, + { + Type: &identity.PluginCapability_Service_{ + Service: &identity.PluginCapability_Service{ + Type: identity.PluginCapability_Service_TYPE_INSTANCE_SIDECAR_INJECTION, + }, + }, + }, }, }, nil }