...

Text file src/edge-infra.dev/test/fixtures/crds/prometheus-operator/monitoring.coreos.com_prometheusrules.yaml

Documentation: edge-infra.dev/test/fixtures/crds/prometheus-operator

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

View as plain text