|
| 1 | +# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.71.2/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.13.0 |
| 8 | + operator.prometheus.io/version: 0.71.2 |
| 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 | + limit: |
| 56 | + description: Limit the number of alerts an alerting rule and |
| 57 | + series a recording rule can produce. Limit is supported starting |
| 58 | + with Prometheus >= 2.31 and Thanos Ruler >= 0.24. |
| 59 | + type: integer |
| 60 | + name: |
| 61 | + description: Name of the rule group. |
| 62 | + minLength: 1 |
| 63 | + type: string |
| 64 | + partial_response_strategy: |
| 65 | + description: 'PartialResponseStrategy is only used by ThanosRuler |
| 66 | + and will be ignored by Prometheus instances. More info: https://github.com/thanos-io/thanos/blob/main/docs/components/rule.md#partial-response' |
| 67 | + pattern: ^(?i)(abort|warn)?$ |
| 68 | + type: string |
| 69 | + rules: |
| 70 | + description: List of alerting and recording rules. |
| 71 | + items: |
| 72 | + description: 'Rule describes an alerting or recording rule |
| 73 | + See Prometheus documentation: [alerting](https://www.prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) |
| 74 | + or [recording](https://www.prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules) |
| 75 | + rule' |
| 76 | + properties: |
| 77 | + alert: |
| 78 | + description: Name of the alert. Must be a valid label |
| 79 | + value. Only one of `record` and `alert` must be set. |
| 80 | + type: string |
| 81 | + annotations: |
| 82 | + additionalProperties: |
| 83 | + type: string |
| 84 | + description: Annotations to add to each alert. Only valid |
| 85 | + for alerting rules. |
| 86 | + type: object |
| 87 | + expr: |
| 88 | + anyOf: |
| 89 | + - type: integer |
| 90 | + - type: string |
| 91 | + description: PromQL expression to evaluate. |
| 92 | + x-kubernetes-int-or-string: true |
| 93 | + for: |
| 94 | + description: Alerts are considered firing once they have |
| 95 | + been returned for this long. |
| 96 | + pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ |
| 97 | + type: string |
| 98 | + keep_firing_for: |
| 99 | + description: KeepFiringFor defines how long an alert will |
| 100 | + continue firing after the condition that triggered it |
| 101 | + has cleared. |
| 102 | + minLength: 1 |
| 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 | + labels: |
| 106 | + additionalProperties: |
| 107 | + type: string |
| 108 | + description: Labels to add or overwrite. |
| 109 | + type: object |
| 110 | + record: |
| 111 | + description: Name of the time series to output to. Must |
| 112 | + be a valid metric name. Only one of `record` and `alert` |
| 113 | + must be set. |
| 114 | + type: string |
| 115 | + required: |
| 116 | + - expr |
| 117 | + type: object |
| 118 | + type: array |
| 119 | + required: |
| 120 | + - name |
| 121 | + type: object |
| 122 | + type: array |
| 123 | + x-kubernetes-list-map-keys: |
| 124 | + - name |
| 125 | + x-kubernetes-list-type: map |
| 126 | + type: object |
| 127 | + required: |
| 128 | + - spec |
| 129 | + type: object |
| 130 | + served: true |
| 131 | + storage: true |
0 commit comments