Skip to content

Track all status conditions and all network interfaces per instance#87

Draft
scotwells wants to merge 2 commits intomainfrom
feat/resource-metrics-policy-conversion
Draft

Track all status conditions and all network interfaces per instance#87
scotwells wants to merge 2 commits intomainfrom
feat/resource-metrics-policy-conversion

Conversation

@scotwells
Copy link
Copy Markdown
Contributor

@scotwells scotwells commented Apr 19, 2026

What this does

Replaces the custom metrics sidecar with a ResourceMetricsPolicy that instructs the resource-metrics operator to collect and export metrics for Workloads, Workload Deployments, and Instances.

Key improvements over the old sidecar:

  • Status conditions — every condition type is now tracked automatically. Previously only specific named conditions (Available, Progressing, Programmed, Running, Ready) were captured; new condition types now appear without any config change.
  • Network interfaces — all interfaces on an instance are now tracked. Previously only the first interface was captured, so multi-homed instances had incomplete network visibility.

Test plan

  • Deploy to a dev environment and confirm metrics appear in Victoria Metrics for Workloads, Workload Deployments, and Instances
  • Verify that all condition types show up as separate series per resource
  • For instances with multiple network interfaces, confirm each interface appears as its own series

🤖 Generated with Claude Code

scotwells and others added 2 commits April 19, 2026 15:05
Converts the three CustomResourceStateMetrics configs for Workload,
WorkloadDeployment, and Instance resources into a single
ResourceMetricsPolicy named compute-metrics using CEL expressions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace hardcoded per-condition-type metrics with a single forEach-based
metric that iterates object.status.conditions, and replace the
networkInterfaces[0] hardcoded index with forEach over
object.status.networkInterfaces so all interfaces are captured.
@scotwells scotwells changed the title feat: convert resource metrics to ResourceMetricsPolicy Track all status conditions and all network interfaces per instance Apr 20, 2026
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.

1 participant