Skip to content

Add metrics for all Milo resources and conditions#571

Merged
scotwells merged 5 commits intomainfrom
feat/resource-metrics-policy-conversion
Apr 28, 2026
Merged

Add metrics for all Milo resources and conditions#571
scotwells merged 5 commits intomainfrom
feat/resource-metrics-policy-conversion

Conversation

@scotwells
Copy link
Copy Markdown
Contributor

@scotwells scotwells commented Apr 19, 2026

Enables metrics collection for every resource across all core Milo services — IAM, identity, infrastructure, resource manager, and quota.

Each resource now exposes:

  • Identity and creation time
  • All status conditions automatically, so new condition types appear in dashboards without any config changes

Metrics are organized per service rather than bundled together, making it easier to deploy and manage coverage for each service independently.

Test plan

  • Deploy to a dev environment and confirm metrics appear in Victoria Metrics for IAM, identity, infrastructure, resource manager, and quota resources
  • Verify that all condition types (not just Ready) show up as separate series per resource

@joggrbot
Copy link
Copy Markdown
Contributor

joggrbot Bot commented Apr 19, 2026

📝 Documentation Analysis

All docs are up to date! 🎉


✅ Latest commit analyzed: 82d6dd5 | Powered by Joggr

@scotwells scotwells changed the title feat: convert resource metrics to ResourceMetricsPolicy Track all status conditions per resource, not just one Apr 20, 2026
@scotwells scotwells changed the title Track all status conditions per resource, not just one Add metrics for all Milo resources and conditions Apr 28, 2026
Enables metrics collection for every resource across all core Milo
services — IAM, identity, infrastructure, resource manager, and quota —
using ResourceMetricsPolicy CRDs.

Each resource exposes an info series with identity and creation time,
plus a status condition series for every condition automatically, so new
condition types appear in dashboards without any config changes.

Metrics are organized per service under config/services/<service>/telemetry/metrics/
rather than bundled together, making it easier to deploy and manage
coverage for each service independently. The old ConfigMap-based metrics
approach has been removed in favour of the policy-based approach.

Also restores userinvitations/finalizers and patch verb to the core
control plane RBAC role, which were accidentally omitted.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@scotwells scotwells force-pushed the feat/resource-metrics-policy-conversion branch from 698bffb to a784e5c Compare April 28, 2026 16:08
@scotwells scotwells requested review from a team, JoseSzycho and zachsmith1 and removed request for a team April 28, 2026 16:09
@scotwells scotwells marked this pull request as ready for review April 28, 2026 16:10
scotwells and others added 2 commits April 28, 2026 12:50
The ResourceMetricsPolicy CRD is provided by milo-os/resource-metrics and
must be present in the Milo API server before config/services/ is applied,
since IAM, identity, infrastructure, resource manager, and quota services
now include ResourceMetricsPolicy resources.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
scotwells and others added 2 commits April 28, 2026 13:26
## ✨ Autofixed 1 outdated doc(s)

This pull was automatically generated by Joggr to fix 1 outdated doc(s)
due to code changes in pull #571

### Fixed docs

The following docs were fixed:

- `config/services/quota/README.md`: References to the old metrics
configuration path and deployment model became outdated because metrics
are now defined in `policy.yaml` under the `telemetry/metrics/`
directory and collected as ResourceMetricsPolicy resources, not via
ConfigMaps in the deprecated path. The remainder of the documentation
about exported metrics and labels remains accurate.

### How to fix

To fix the docs, you can either:

1. Merge this pull request into your pull request to fix the docs
2. Wait for your pull request to be merged and then merge this pull
request into your base branch

---

Powered by
[Joggr](https://joggr.ai?utm_source=gh&utm_medium=gh&utm_campaign=ghapr&utm_id=ghapr)
- The documentation assistant for your codebase.
🤖 Automatically added newlines to 1 file(s)

Co-Authored-By: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented Apr 28, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ scotwells
❌ joggrbot[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link
Copy Markdown
Contributor

🤖 I automatically added missing newlines at the end of 1 file(s) in this PR.

All files should now end with a newline character as per coding standards.

@drewr
Copy link
Copy Markdown
Contributor

drewr commented Apr 28, 2026

I'm trying to understand the net change here. We weren't reporting on things like creation time and status conditions before?

@scotwells
Copy link
Copy Markdown
Contributor Author

@drewr creation time / status conditions were available in the control plane. This configures the resource-metrics service to surface this data as time series data so we can understand how this data changes over time. Only the quota resources had their resource info surfaced as telemetry data.

We're moving to the resource-metrics service because a single deployment can collect metrics across all projects instead of deploying an instance of kube-state-metrics per project like we are today.

@drewr
Copy link
Copy Markdown
Contributor

drewr commented Apr 28, 2026

Got it. This is enabling the pivot from kube-state-metrics. Thanks!

@scotwells scotwells merged commit 0e7ac60 into main Apr 28, 2026
3 of 4 checks passed
@scotwells scotwells deleted the feat/resource-metrics-policy-conversion branch April 28, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants