apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: prometheusrules.monitoring.coreos.com
spec:
  group: monitoring.coreos.com
  names:
    kind: PrometheusRule
    plural: prometheusrules
  scope: Namespaced
  validation:
    openAPIV3Schema:
      properties:
        spec:
          description: PrometheusRuleSpec contains specification parameters for a
            Rule.
          properties:
            groups:
              description: Content of Prometheus rule file
              items:
                description: RuleGroup is a list of sequentially evaluated recording
                  and alerting rules.
                properties:
                  interval:
                    type: string
                  name:
                    type: string
                  rules:
                    items:
                      description: Rule describes an alerting or recording rule.
                      properties:
                        alert:
                          type: string
                        annotations:
                          type: object
                        expr:
                          type: string
                        for:
                          type: string
                        labels:
                          type: object
                        record:
                          type: string
                      required:
                      - expr
                    type: array
                required:
                - name
                - rules
              type: array
  version: v1
