apiVersion: apps.grafana.com/v1alpha2 kind: AppManifest metadata: name: alerting spec: appName: alerting group: rules.alerting.grafana.app versions: - kinds: - conversion: false kind: AlertRule plural: AlertRules schemas: AlertRule: properties: spec: $ref: '#/components/schemas/spec' status: $ref: '#/components/schemas/status' required: - spec DatasourceUID: type: string Expression: additionalProperties: false properties: datasourceUID: $ref: '#/components/schemas/DatasourceUID' description: The UID of the datasource to run this expression against. If omitted, the expression will be run against the `__expr__` datasource model: additionalProperties: {} type: object queryType: description: The type of query if this is a query expression type: string relativeTimeRange: $ref: '#/components/schemas/RelativeTimeRange' 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 ExpressionMap: additionalProperties: $ref: '#/components/schemas/Expression' description: |- TODO: validate that only one can specify source=true & struct.MinFields(1) This doesn't work in Cue