Skip to content

ManagedMetric Not Filtering by kind/group/version #47

@rouzbehsedighi

Description

@rouzbehsedighi

The ManagedMetric resource does not respect the spec's kind, group, or version fields. It appears to collect metrics from all Crossplane-managed resources, regardless of the specified fields.

Expected Behavior:

Given the following ManagedMetric:

apiVersion: metrics.openmcp.cloud/v1alpha1
kind: ManagedMetric
metadata:
  name: managed-metric-subaccount
  namespace: metrics-operator
spec:
  name: managed-metric-subaccount
  description: Status metric created by an Operator
  kind: Subaccount
  group: account.btp.sap.crossplane.io
  version: v1alpha1
  interval: "1m"

It should only collect metrics from resources of:

apiVersion: account.btp.sap.crossplane.io
kind: Subaccount

Actual Behavior:

The ManagedMetric is collecting metrics from all managed resources, including unrelated kinds like Azure PostgreSQL.

Additionally, all the retrieved metrics are reported as if the resource kind is Subaccount, even when the actual resource is, for example, Azure Keyvault.

Image

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions