feat: convert resource metrics to ResourceMetricsPolicy#65
Open
feat: convert resource metrics to ResourceMetricsPolicy#65
Conversation
Converts the CustomResourceStateMetrics config for ExportPolicy to the new ResourceMetricsPolicy CRD format using CEL expressions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rceMetricsPolicy Deletes config/resource-metrics/ (KSM sidecar ConfigMap approach) and wires config/default/kustomization.yaml to the new config/resource-metrics-policies/ directory instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Converts config/resource-metrics-policies/ from a Kustomization to a Component (v1alpha1) so it can be opted into via a components: entry rather than being included in the default overlay. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces the single-series workarounds with forEach iteration now that the resource-metrics service supports array field paths: - status_condition: iterates object.status.conditions, emitting one series per condition type with condition/reason/status labels. - sink_status_condition: iterates object.status.sinks, emitting one series per sink (sink_name label) indicating Ready condition state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ce-metrics/ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the
CustomResourceStateMetricsKSM sidecar config (config/resource-metrics/) with theResourceMetricsPolicyCRD, and removes the old config entirely.config/resource-metrics/(KSM ConfigMap approach)config/components/resource-metrics/as an optional kustomize component (kind: Component) — opt in viacomponents:, not included in the default overlayforEacharray iteration (added in a recent resource-metrics release) to restore full per-condition and per-sink cardinalityConverted metrics
datum_cloud_telemetry_export_policy_infodatum_cloud_telemetry_export_policy_createddouble(timestamp(...).getSeconds())datum_cloud_telemetry_export_policy_status_conditionforEach: object.status.conditions; labels: condition, reason, statusdatum_cloud_telemetry_export_policy_sink_status_conditionforEach: object.status.sinks; labels: sink_name, conditionTest plan
ResourceMetricsPolicyCRD is installed in the target cluster.config/components/resource-metrics/with kustomize and confirm the policy is accepted without validation errors.status_conditionemits one series per condition type (not justReady).sink_status_conditionemits one series per sink with asink_namelabel.🤖 Generated with Claude Code