Skip to content

Export Crossplane managed-resource conditions as metrics (first increment of #2820) #2993

Description

@devantler

🤖 Generated by the Agentic Engineer

First increment of #2820. The alerting rule cannot be written before the series
exists, so this child delivers only the metric source.

Evidence

Measured on the live cluster 2026-08-06, over repositories.repo.github.m.upbound.io:

That gives the increment a live positive fixture (3) and a live negative one (17)
without constructing anything.

Scope

Repository only, deliberately. CustomResourceStateMetrics matches an exact
groupVersionKind — there is no wildcard and no categories: managed selector — so
each of the 16 managed-resource kinds must be listed individually. Starting with the
one kind that carries the observed failure proves the pipeline end to end before
committing to a list that will drift. Extending coverage is a separate child, and
until it lands the exporter's coverage is explicitly partial.

Acceptance criteria

  • crossplane_managed_resource_condition is queryable in coroot-prometheus,
    one series per (resource, condition), value 1 for True and 0 for False.
  • Ready is exported alongside Synced, so the Ready-True-while-Synced-False
    pair is expressible as a single query.
  • Ships default-off (unreferenced component), so activation is a separate,
    independently reversible change.
  • Read-only RBAC scoped to the exported kind, not apiGroups: ["*"].
  • Verified after activation by comparing the metric against a live
    kubectl read: 3 Synced=False, 17 Synced=True.

Rough size: one Kustomize component, off-the-shelf images, no bespoke code.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status
✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions