github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/prometheus-community/kube-prometheus-stack/crds/crd-prometheusrules.yaml (about)

     1  # https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.63.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
     2  ---
     3  apiVersion: apiextensions.k8s.io/v1
     4  kind: CustomResourceDefinition
     5  metadata:
     6    annotations:
     7      controller-gen.kubebuilder.io/version: v0.11.1
     8    creationTimestamp: null
     9    name: prometheusrules.monitoring.coreos.com
    10  spec:
    11    group: monitoring.coreos.com
    12    names:
    13      categories:
    14      - prometheus-operator
    15      kind: PrometheusRule
    16      listKind: PrometheusRuleList
    17      plural: prometheusrules
    18      shortNames:
    19      - promrule
    20      singular: prometheusrule
    21    scope: Namespaced
    22    versions:
    23    - name: v1
    24      schema:
    25        openAPIV3Schema:
    26          description: PrometheusRule defines recording and alerting rules for a Prometheus
    27            instance
    28          properties:
    29            apiVersion:
    30              description: 'APIVersion defines the versioned schema of this representation
    31                of an object. Servers should convert recognized schemas to the latest
    32                internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
    33              type: string
    34            kind:
    35              description: 'Kind is a string value representing the REST resource this
    36                object represents. Servers may infer this from the endpoint the client
    37                submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
    38              type: string
    39            metadata:
    40              type: object
    41            spec:
    42              description: Specification of desired alerting rule definitions for Prometheus.
    43              properties:
    44                groups:
    45                  description: Content of Prometheus rule file
    46                  items:
    47                    description: RuleGroup is a list of sequentially evaluated recording
    48                      and alerting rules.
    49                    properties:
    50                      interval:
    51                        description: Interval determines how often rules in the group
    52                          are evaluated.
    53                        pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
    54                        type: string
    55                      name:
    56                        description: Name of the rule group.
    57                        minLength: 1
    58                        type: string
    59                      partial_response_strategy:
    60                        description: 'PartialResponseStrategy is only used by ThanosRuler
    61                          and will be ignored by Prometheus instances. More info: https://github.com/thanos-io/thanos/blob/main/docs/components/rule.md#partial-response'
    62                        pattern: ^(?i)(abort|warn)?$
    63                        type: string
    64                      rules:
    65                        description: List of alerting and recording rules.
    66                        items:
    67                          description: 'Rule describes an alerting or recording rule
    68                            See Prometheus documentation: [alerting](https://www.prometheus.io/docs/prometheus/latest/configuration/alerting_rules/)
    69                            or [recording](https://www.prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules)
    70                            rule'
    71                          properties:
    72                            alert:
    73                              description: Name of the alert. Must be a valid label
    74                                value. Only one of `record` and `alert` must be set.
    75                              type: string
    76                            annotations:
    77                              additionalProperties:
    78                                type: string
    79                              description: Annotations to add to each alert. Only valid
    80                                for alerting rules.
    81                              type: object
    82                            expr:
    83                              anyOf:
    84                              - type: integer
    85                              - type: string
    86                              description: PromQL expression to evaluate.
    87                              x-kubernetes-int-or-string: true
    88                            for:
    89                              description: Alerts are considered firing once they have
    90                                been returned for this long.
    91                              pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
    92                              type: string
    93                            labels:
    94                              additionalProperties:
    95                                type: string
    96                              description: Labels to add or overwrite.
    97                              type: object
    98                            record:
    99                              description: Name of the time series to output to. Must
   100                                be a valid metric name. Only one of `record` and `alert`
   101                                must be set.
   102                              type: string
   103                          required:
   104                          - expr
   105                          type: object
   106                        type: array
   107                    required:
   108                    - name
   109                    - rules
   110                    type: object
   111                  type: array
   112                  x-kubernetes-list-map-keys:
   113                  - name
   114                  x-kubernetes-list-type: map
   115              type: object
   116          required:
   117          - spec
   118          type: object
   119      served: true
   120      storage: true