-
Notifications
You must be signed in to change notification settings - Fork 1
check-rules update does not support PrometheusRule CRD files #110
Copy link
Copy link
Closed
Description
Problem
dash0 check-rules update -f <file> fails when the file is a PrometheusRule CRD:
$ dash0 check-rules update -f otel-collector-export-failures.yaml
Error: no check rule ID provided as argument, and the file does not contain an ID
The file contains a valid dash0.com/id label in metadata.labels, but the update command reads the file directly into a PrometheusAlertRule struct without detecting the kind first. The ID in a PrometheusRule CRD is stored in metadata.labels["dash0.com/id"], not in a top-level id field, so it is silently lost.
Both apply and check-rules create handle PrometheusRule CRDs correctly by detecting the kind and routing to the appropriate parser.
Expected behavior
check-rules update should accept PrometheusRule CRD files, matching the behavior of apply and check-rules create. For update, the CRD must contain exactly one alerting rule.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels