apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: alertrules.rules.alerting.grafana.app spec: group: rules.alerting.grafana.app names: kind: AlertRule plural: alertrules scope: Namespaced versions: - name: v0alpha1 schema: openAPIV3Schema: properties: spec: properties: annotations: additionalProperties: type: string type: object execErrState: default: Error type: string expressions: additionalProperties: properties: datasourceUID: type: string model: type: object x-kubernetes-preserve-unknown-fields: true queryType: description: The type of query if this is a query expression type: string relativeTimeRange: properties: from: type: string to: type: string required: - from - to type: object source: description: |- Used to mark the expression to be used as the final source for the rule evaluation Only one expression in a rule can be marked as the source For AlertRules, this is the expression that will be evaluated against the alerting condition For RecordingRules, this is the expression that will be recorded type: boolean required: - model type: object description: |- TODO: validate that only one can specify source=true & struct.MinFields(1) This doesn't work in Cue