11{{- if .Values.prometheusrules.enabled -}}
2- # https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.85 .0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
2+ # https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.86 .0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
33---
44apiVersion : apiextensions.k8s.io/v1
55kind : CustomResourceDefinition
@@ -8,8 +8,8 @@ metadata:
88{{- with .Values.annotations }}
99{{- toYaml . | nindent 4 }}
1010{{- end }}
11- controller-gen.kubebuilder.io/version : v0.18 .0
12- operator.prometheus.io/version : 0.85 .0
11+ controller-gen.kubebuilder.io/version : v0.19 .0
12+ operator.prometheus.io/version : 0.86 .0
1313 name : prometheusrules.monitoring.coreos.com
1414spec :
1515 group : monitoring.coreos.com
@@ -50,99 +50,101 @@ spec:
5050 metadata :
5151 type : object
5252 spec :
53- description : Specification of desired alerting rule definitions for Prometheus.
53+ description : spec defines the specification of desired alerting rule definitions
54+ for Prometheus.
5455 properties :
5556 groups :
56- description : Content of Prometheus rule file
57+ description : groups defines the content of Prometheus rule file
5758 items :
5859 description : RuleGroup is a list of sequentially evaluated recording
5960 and alerting rules.
6061 properties :
6162 interval :
62- description : Interval determines how often rules in the group
63- are evaluated.
63+ description : interval defines how often rules in the group are
64+ evaluated.
6465 pattern : ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
6566 type : string
6667 labels :
6768 additionalProperties :
6869 type : string
6970 description : |-
70- Labels to add or overwrite before storing the result for its rules.
71+ labels define the labels to add or overwrite before storing the result for its rules.
7172 The labels defined at the rule level take precedence.
7273
7374 It requires Prometheus >= 3.0.0.
7475 The field is ignored for Thanos Ruler.
7576 type : object
7677 limit :
7778 description : |-
78- Limit the number of alerts an alerting rule and series a recording
79+ limit defines the number of alerts an alerting rule and series a recording
7980 rule can produce.
8081 Limit is supported starting with Prometheus >= 2.31 and Thanos Ruler >= 0.24.
8182 type : integer
8283 name :
83- description : Name of the rule group.
84+ description : name defines the name of the rule group.
8485 minLength : 1
8586 type : string
8687 partial_response_strategy :
8788 description : |-
88- PartialResponseStrategy is only used by ThanosRuler and will
89+ partial_response_strategy is only used by ThanosRuler and will
8990 be ignored by Prometheus instances.
9091 More info: https://github.com/thanos-io/thanos/blob/main/docs/components/rule.md#partial-response
9192 pattern : ^(?i)(abort|warn)?$
9293 type : string
9394 query_offset :
9495 description : |-
95- Defines the offset the rule evaluation timestamp of this particular group by the specified duration into the past.
96+ query_offset defines the offset the rule evaluation timestamp of this particular group by the specified duration into the past.
9697
9798 It requires Prometheus >= v2.53.0.
9899 It is not supported for ThanosRuler.
99100 pattern : ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
100101 type : string
101102 rules :
102- description : List of alerting and recording rules.
103+ description : rules defines the list of alerting and recording
104+ rules.
103105 items :
104106 description : |-
105107 Rule describes an alerting or recording rule
106108 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
107109 properties :
108110 alert :
109111 description : |-
110- Name of the alert. Must be a valid label value.
112+ alert defines the name of the alert. Must be a valid label value.
111113 Only one of `record` and `alert` must be set.
112114 type : string
113115 annotations :
114116 additionalProperties :
115117 type : string
116118 description : |-
117- Annotations to add to each alert.
119+ annotations defines annotations to add to each alert.
118120 Only valid for alerting rules.
119121 type : object
120122 expr :
121123 anyOf :
122124 - type : integer
123125 - type : string
124- description : PromQL expression to evaluate.
126+ description : expr defines the PromQL expression to evaluate.
125127 x-kubernetes-int-or-string : true
126128 for :
127- description : Alerts are considered firing once they have
128- been returned for this long.
129+ description : for defines how alerts are considered firing
130+ once they have been returned for this long.
129131 pattern : ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
130132 type : string
131133 keep_firing_for :
132- description : KeepFiringFor defines how long an alert will
133- continue firing after the condition that triggered it
134- has cleared.
134+ description : keep_firing_for defines how long an alert
135+ will continue firing after the condition that triggered
136+ it has cleared.
135137 minLength : 1
136138 pattern : ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
137139 type : string
138140 labels :
139141 additionalProperties :
140142 type : string
141- description : Labels to add or overwrite.
143+ description : labels defines labels to add or overwrite.
142144 type : object
143145 record :
144146 description : |-
145- Name of the time series to output to. Must be a valid metric name.
147+ record defines the name of the time series to output to. Must be a valid metric name.
146148 Only one of `record` and `alert` must be set.
147149 type : string
148150 required :
@@ -157,9 +159,114 @@ spec:
157159 - name
158160 x-kubernetes-list-type : map
159161 type : object
162+ status :
163+ description : |-
164+ status defines the status subresource. It is under active development and is updated only when the
165+ "StatusForConfigurationResources" feature gate is enabled.
166+
167+ Most recent observed status of the PrometheusRule. Read-only.
168+ More info:
169+ https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
170+ properties :
171+ bindings :
172+ description : bindings defines the list of workload resources (Prometheus,
173+ PrometheusAgent, ThanosRuler or Alertmanager) which select the configuration
174+ resource.
175+ items :
176+ description : WorkloadBinding is a link between a configuration resource
177+ and a workload resource.
178+ properties :
179+ conditions :
180+ description : conditions defines the current state of the configuration
181+ resource when bound to the referenced Workload object.
182+ items :
183+ description : ConfigResourceCondition describes the status
184+ of configuration resources linked to Prometheus, PrometheusAgent,
185+ Alertmanager or ThanosRuler.
186+ properties :
187+ lastTransitionTime :
188+ description : lastTransitionTime defines the time of the
189+ last update to the current status property.
190+ format : date-time
191+ type : string
192+ message :
193+ description : message defines the human-readable message
194+ indicating details for the condition's last transition.
195+ type : string
196+ observedGeneration :
197+ description : |-
198+ observedGeneration defines the .metadata.generation that the
199+ condition was set based upon. For instance, if `.metadata.generation` is
200+ currently 12, but the `.status.conditions[].observedGeneration` is 9, the
201+ condition is out of date with respect to the current state of the object.
202+ format : int64
203+ type : integer
204+ reason :
205+ description : reason for the condition's last transition.
206+ type : string
207+ status :
208+ description : status of the condition.
209+ minLength : 1
210+ type : string
211+ type :
212+ description : |-
213+ type of the condition being reported.
214+ Currently, only "Accepted" is supported.
215+ enum :
216+ - Accepted
217+ minLength : 1
218+ type : string
219+ required :
220+ - lastTransitionTime
221+ - status
222+ - type
223+ type : object
224+ type : array
225+ x-kubernetes-list-map-keys :
226+ - type
227+ x-kubernetes-list-type : map
228+ group :
229+ description : group defines the group of the referenced resource.
230+ enum :
231+ - monitoring.coreos.com
232+ type : string
233+ name :
234+ description : name defines the name of the referenced object.
235+ minLength : 1
236+ type : string
237+ namespace :
238+ description : namespace defines the namespace of the referenced
239+ object.
240+ minLength : 1
241+ type : string
242+ resource :
243+ description : resource defines the type of resource being referenced
244+ (e.g. Prometheus, PrometheusAgent, ThanosRuler or Alertmanager).
245+ enum :
246+ - prometheuses
247+ - prometheusagents
248+ - thanosrulers
249+ - alertmanagers
250+ type : string
251+ required :
252+ - group
253+ - name
254+ - namespace
255+ - resource
256+ type : object
257+ type : array
258+ x-kubernetes-list-map-keys :
259+ - group
260+ - resource
261+ - name
262+ - namespace
263+ x-kubernetes-list-type : map
264+ type : object
160265 required :
161266 - spec
162267 type : object
163268 served : true
164269 storage : true
270+ subresources :
271+ status : {}
165272{{- end -}}
0 commit comments