{
  "description": "GlobalRules defines Prometheus alerting and recording rules that are scoped\nto all data in the queried project.\nIf the project_id or location labels are not preserved by the rule, they default to\nthe values of the cluster.",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "Specification of rules to record and alert on.",
      "properties": {
        "groups": {
          "description": "A list of Prometheus rule groups.",
          "items": {
            "description": "RuleGroup declares rules in the Prometheus format:\nhttps://prometheus.io/docs/prometheus/latest/configuration/recording_rules/",
            "properties": {
              "interval": {
                "description": "The interval at which to evaluate the rules. Must be a valid Prometheus duration.",
                "type": "string"
              },
              "name": {
                "description": "The name of the rule group.",
                "type": "string"
              },
              "rules": {
                "description": "A list of rules that are executed sequentially as part of this group.",
                "items": {
                  "description": "Rule is a single rule in the Prometheus format:\nhttps://prometheus.io/docs/prometheus/latest/configuration/recording_rules/",
                  "properties": {
                    "alert": {
                      "description": "Name of the alert to evaluate the expression as.\nOnly one of `record` and `alert` must be set.",
                      "type": "string"
                    },
                    "annotations": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "A set of annotations to attach to alerts produced by the query expression.\nOnly valid if `alert` is set.",
                      "type": "object"
                    },
                    "expr": {
                      "description": "The PromQL expression to evaluate.",
                      "type": "string"
                    },
                    "for": {
                      "description": "The duration to wait before a firing alert produced by this rule is sent to Alertmanager.\nOnly valid if `alert` is set.",
                      "type": "string"
                    },
                    "labels": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "description": "A set of labels to attach to the result of the query expression.",
                      "type": "object"
                    },
                    "record": {
                      "description": "Record the result of the expression to this metric name.\nOnly one of `record` and `alert` must be set.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "expr"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "type": "array"
              }
            },
            "required": [
              "interval",
              "name",
              "rules"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        }
      },
      "required": [
        "groups"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "Most recently observed status of the resource.",
      "type": "object"
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
