Skip to main content

tatara_prometheus_operator/
lib.rs

1//! tatara-prometheus-operator — auto-generated tatara domain.
2//!
3//! Tatara domain wrapping 1 CRD(s).
4//!
5//! Generated by `tatara-domain-forge`. Do not hand-edit.
6//! Re-run the generator to refresh.
7
8#![allow(clippy::module_name_repetitions)]
9
10use serde::{Deserialize, Serialize};
11use tatara_lisp_derive::TataraDomain;
12
13/// The `PodMonitor` custom resource definition (CRD) defines how `Prometheus` and `PrometheusAgent` can scrape metrics from a group of pods.
14/// Among other things, it allows to specify:
15/// * The pods to scrape via label selectors.
16/// * The container ports to scrape.
17/// * Authentication credentials to use.
18/// * Target and metric relabeling.
19/// 
20/// `Prometheus` and `PrometheusAgent` objects select `PodMonitor` objects using label and namespace selectors.
21#[derive(Debug, Clone, Serialize, Deserialize, TataraDomain)]
22#[tatara(keyword = "defpodmonitor")]
23pub struct PodMonitorSpec {
24    /// `attachMetadata` defines additional metadata which is added to the
25    /// discovered targets.
26    /// 
27    /// It requires Prometheus >= v2.35.0.
28    #[serde(default)]
29    pub attach_metadata: Option<PodMonitorAttachMetadata>,
30    /// When defined, bodySizeLimit specifies a job level limit on the size
31    /// of uncompressed response body that will be accepted by Prometheus.
32    /// 
33    /// It requires Prometheus >= v2.28.0.
34    #[serde(default)]
35    pub body_size_limit: Option<String>,
36    /// The protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type.
37    /// 
38    /// It requires Prometheus >= v3.0.0.
39    #[serde(default)]
40    pub fallback_scrape_protocol: Option<PodMonitorFallbackScrapeProtocolKind>,
41    /// The label to use to retrieve the job name from.
42    /// `jobLabel` selects the label from the associated Kubernetes `Pod`
43    /// object which will be used as the `job` label for all metrics.
44    /// 
45    /// For example if `jobLabel` is set to `foo` and the Kubernetes `Pod`
46    /// object is labeled with `foo: bar`, then Prometheus adds the `job="bar"`
47    /// label to all ingested metrics.
48    /// 
49    /// If the value of this field is empty, the `job` label of the metrics
50    /// defaults to the namespace and name of the PodMonitor object (e.g. `<namespace>/<name>`).
51    #[serde(default)]
52    pub job_label: Option<String>,
53    /// Per-scrape limit on the number of targets dropped by relabeling
54    /// that will be kept in memory. 0 means no limit.
55    /// 
56    /// It requires Prometheus >= v2.47.0.
57    #[serde(default)]
58    pub keep_dropped_targets: Option<i64>,
59    /// Per-scrape limit on number of labels that will be accepted for a sample.
60    /// 
61    /// It requires Prometheus >= v2.27.0.
62    #[serde(default)]
63    pub label_limit: Option<i64>,
64    /// Per-scrape limit on length of labels name that will be accepted for a sample.
65    /// 
66    /// It requires Prometheus >= v2.27.0.
67    #[serde(default)]
68    pub label_name_length_limit: Option<i64>,
69    /// Per-scrape limit on length of labels value that will be accepted for a sample.
70    /// 
71    /// It requires Prometheus >= v2.27.0.
72    #[serde(default)]
73    pub label_value_length_limit: Option<i64>,
74    /// `namespaceSelector` defines in which namespace(s) Prometheus should discover the pods.
75    /// By default, the pods are discovered in the same namespace as the `PodMonitor` object but it is possible to select pods across different/all namespaces.
76    #[serde(default)]
77    pub namespace_selector: Option<PodMonitorNamespaceSelector>,
78    /// If there are more than this many buckets in a native histogram,
79    /// buckets will be merged to stay within the limit.
80    /// It requires Prometheus >= v2.45.0.
81    #[serde(default)]
82    pub native_histogram_bucket_limit: Option<i64>,
83    /// If the growth factor of one bucket to the next is smaller than this,
84    /// buckets will be merged to increase the factor sufficiently.
85    /// It requires Prometheus >= v2.50.0.
86    #[serde(default)]
87    pub native_histogram_min_bucket_factor: Option<serde_json::Value>,
88    /// Defines how to scrape metrics from the selected pods.
89    #[serde(default)]
90    pub pod_metrics_endpoints: Option<Vec<PodMonitorPodMetricsEndpointsItem>>,
91    /// `podTargetLabels` defines the labels which are transferred from the
92    /// associated Kubernetes `Pod` object onto the ingested metrics.
93    #[serde(default)]
94    pub pod_target_labels: Option<Vec<String>>,
95    /// `sampleLimit` defines a per-scrape limit on the number of scraped samples
96    /// that will be accepted.
97    #[serde(default)]
98    pub sample_limit: Option<i64>,
99    /// The scrape class to apply.
100    #[serde(default)]
101    pub scrape_class: Option<String>,
102    /// Whether to scrape a classic histogram that is also exposed as a native histogram.
103    /// It requires Prometheus >= v2.45.0.
104    #[serde(default)]
105    pub scrape_classic_histograms: Option<bool>,
106    /// `scrapeProtocols` defines the protocols to negotiate during a scrape. It tells clients the
107    /// protocols supported by Prometheus in order of preference (from most to least preferred).
108    /// 
109    /// If unset, Prometheus uses its default value.
110    /// 
111    /// It requires Prometheus >= v2.49.0.
112    #[serde(default)]
113    pub scrape_protocols: Option<Vec<PodMonitorScrapeProtocolsItemKind>>,
114    /// Label selector to select the Kubernetes `Pod` objects to scrape metrics from.
115    pub selector: PodMonitorSelector,
116    /// Mechanism used to select the endpoints to scrape.
117    /// By default, the selection process relies on relabel configurations to filter the discovered targets.
118    /// Alternatively, you can opt in for role selectors, which may offer better efficiency in large clusters.
119    /// Which strategy is best for your use case needs to be carefully evaluated.
120    /// 
121    /// It requires Prometheus >= v2.17.0.
122    #[serde(default)]
123    pub selector_mechanism: Option<PodMonitorSelectorMechanismKind>,
124    /// `targetLimit` defines a limit on the number of scraped targets that will
125    /// be accepted.
126    #[serde(default)]
127    pub target_limit: Option<i64>,
128}
129
130// ── Nested types ──────────────────────────────────────
131#[derive(Debug, Clone, Serialize, Deserialize)]
132pub struct PodMonitorAttachMetadata {
133    /// When set to true, Prometheus attaches node metadata to the discovered
134    /// targets.
135    /// 
136    /// The Prometheus service account must have the `list` and `watch`
137    /// permissions on the `Nodes` objects.
138    #[serde(default)]
139    pub node: Option<bool>,
140}
141
142#[derive(Debug, Clone, Serialize, Deserialize)]
143pub enum PodMonitorFallbackScrapeProtocolKind {
144    #[serde(rename = "PrometheusProto")]
145    PrometheusProto,
146    #[serde(rename = "OpenMetricsText0.0.1")]
147    OpenMetricsText001,
148    #[serde(rename = "OpenMetricsText1.0.0")]
149    OpenMetricsText100,
150    #[serde(rename = "PrometheusText0.0.4")]
151    PrometheusText004,
152    #[serde(rename = "PrometheusText1.0.0")]
153    PrometheusText100,
154}
155
156#[derive(Debug, Clone, Serialize, Deserialize)]
157pub struct PodMonitorNamespaceSelector {
158    /// Boolean describing whether all namespaces are selected in contrast to a
159    /// list restricting them.
160    #[serde(default)]
161    pub any: Option<bool>,
162    /// List of namespace names to select from.
163    #[serde(default)]
164    pub match_names: Option<Vec<String>>,
165}
166
167#[derive(Debug, Clone, Serialize, Deserialize)]
168pub struct PodMonitorPodMetricsEndpointsItemAuthorizationCredentials {
169    /// The key of the secret to select from.  Must be a valid secret key.
170    pub key: String,
171    /// Name of the referent.
172    /// This field is effectively required, but due to backwards compatibility is
173    /// allowed to be empty. Instances of this type with an empty value here are
174    /// almost certainly wrong.
175    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
176    #[serde(default)]
177    pub name: Option<String>,
178    /// Specify whether the Secret or its key must be defined
179    #[serde(default)]
180    pub optional: Option<bool>,
181}
182
183#[derive(Debug, Clone, Serialize, Deserialize)]
184pub struct PodMonitorPodMetricsEndpointsItemAuthorization {
185    /// Selects a key of a Secret in the namespace that contains the credentials for authentication.
186    #[serde(default)]
187    pub credentials: Option<PodMonitorPodMetricsEndpointsItemAuthorizationCredentials>,
188    /// Defines the authentication type. The value is case-insensitive.
189    /// 
190    /// "Basic" is not a supported value.
191    /// 
192    /// Default: "Bearer"
193    #[serde(default)]
194    pub r#type: Option<String>,
195}
196
197#[derive(Debug, Clone, Serialize, Deserialize)]
198pub struct PodMonitorPodMetricsEndpointsItemBasicAuthPassword {
199    /// The key of the secret to select from.  Must be a valid secret key.
200    pub key: String,
201    /// Name of the referent.
202    /// This field is effectively required, but due to backwards compatibility is
203    /// allowed to be empty. Instances of this type with an empty value here are
204    /// almost certainly wrong.
205    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
206    #[serde(default)]
207    pub name: Option<String>,
208    /// Specify whether the Secret or its key must be defined
209    #[serde(default)]
210    pub optional: Option<bool>,
211}
212
213#[derive(Debug, Clone, Serialize, Deserialize)]
214pub struct PodMonitorPodMetricsEndpointsItemBasicAuthUsername {
215    /// The key of the secret to select from.  Must be a valid secret key.
216    pub key: String,
217    /// Name of the referent.
218    /// This field is effectively required, but due to backwards compatibility is
219    /// allowed to be empty. Instances of this type with an empty value here are
220    /// almost certainly wrong.
221    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
222    #[serde(default)]
223    pub name: Option<String>,
224    /// Specify whether the Secret or its key must be defined
225    #[serde(default)]
226    pub optional: Option<bool>,
227}
228
229#[derive(Debug, Clone, Serialize, Deserialize)]
230pub struct PodMonitorPodMetricsEndpointsItemBasicAuth {
231    /// `password` specifies a key of a Secret containing the password for
232    /// authentication.
233    #[serde(default)]
234    pub password: Option<PodMonitorPodMetricsEndpointsItemBasicAuthPassword>,
235    /// `username` specifies a key of a Secret containing the username for
236    /// authentication.
237    #[serde(default)]
238    pub username: Option<PodMonitorPodMetricsEndpointsItemBasicAuthUsername>,
239}
240
241#[derive(Debug, Clone, Serialize, Deserialize)]
242pub struct PodMonitorPodMetricsEndpointsItemBearerTokenSecret {
243    /// The key of the secret to select from.  Must be a valid secret key.
244    pub key: String,
245    /// Name of the referent.
246    /// This field is effectively required, but due to backwards compatibility is
247    /// allowed to be empty. Instances of this type with an empty value here are
248    /// almost certainly wrong.
249    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
250    #[serde(default)]
251    pub name: Option<String>,
252    /// Specify whether the Secret or its key must be defined
253    #[serde(default)]
254    pub optional: Option<bool>,
255}
256
257#[derive(Debug, Clone, Serialize, Deserialize)]
258pub enum PodMonitorPodMetricsEndpointsItemMetricRelabelingsItemActionKind {
259    #[serde(rename = "replace")]
260    Replace,
261    #[serde(rename = "Replace")]
262    ReplaceV1,
263    #[serde(rename = "keep")]
264    Keep,
265    #[serde(rename = "Keep")]
266    KeepV1,
267    #[serde(rename = "drop")]
268    Drop,
269    #[serde(rename = "Drop")]
270    DropV1,
271    #[serde(rename = "hashmod")]
272    Hashmod,
273    #[serde(rename = "HashMod")]
274    HashMod,
275    #[serde(rename = "labelmap")]
276    Labelmap,
277    #[serde(rename = "LabelMap")]
278    LabelMap,
279    #[serde(rename = "labeldrop")]
280    Labeldrop,
281    #[serde(rename = "LabelDrop")]
282    LabelDrop,
283    #[serde(rename = "labelkeep")]
284    Labelkeep,
285    #[serde(rename = "LabelKeep")]
286    LabelKeep,
287    #[serde(rename = "lowercase")]
288    Lowercase,
289    #[serde(rename = "Lowercase")]
290    LowercaseV1,
291    #[serde(rename = "uppercase")]
292    Uppercase,
293    #[serde(rename = "Uppercase")]
294    UppercaseV1,
295    #[serde(rename = "keepequal")]
296    Keepequal,
297    #[serde(rename = "KeepEqual")]
298    KeepEqual,
299    #[serde(rename = "dropequal")]
300    Dropequal,
301    #[serde(rename = "DropEqual")]
302    DropEqual,
303}
304
305#[derive(Debug, Clone, Serialize, Deserialize)]
306pub struct PodMonitorPodMetricsEndpointsItemMetricRelabelingsItem {
307    /// Action to perform based on the regex matching.
308    /// 
309    /// `Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0.
310    /// `DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0.
311    /// 
312    /// Default: "Replace"
313    #[serde(default)]
314    pub action: Option<PodMonitorPodMetricsEndpointsItemMetricRelabelingsItemActionKind>,
315    /// Modulus to take of the hash of the source label values.
316    /// 
317    /// Only applicable when the action is `HashMod`.
318    #[serde(default)]
319    pub modulus: Option<i64>,
320    /// Regular expression against which the extracted value is matched.
321    #[serde(default)]
322    pub regex: Option<String>,
323    /// Replacement value against which a Replace action is performed if the
324    /// regular expression matches.
325    /// 
326    /// Regex capture groups are available.
327    #[serde(default)]
328    pub replacement: Option<String>,
329    /// Separator is the string between concatenated SourceLabels.
330    #[serde(default)]
331    pub separator: Option<String>,
332    /// The source labels select values from existing labels. Their content is
333    /// concatenated using the configured Separator and matched against the
334    /// configured regular expression.
335    #[serde(default)]
336    pub source_labels: Option<Vec<String>>,
337    /// Label to which the resulting string is written in a replacement.
338    /// 
339    /// It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`,
340    /// `KeepEqual` and `DropEqual` actions.
341    /// 
342    /// Regex capture groups are available.
343    #[serde(default)]
344    pub target_label: Option<String>,
345}
346
347#[derive(Debug, Clone, Serialize, Deserialize)]
348pub struct PodMonitorPodMetricsEndpointsItemOauth2ClientIdConfigMap {
349    /// The key to select.
350    pub key: String,
351    /// Name of the referent.
352    /// This field is effectively required, but due to backwards compatibility is
353    /// allowed to be empty. Instances of this type with an empty value here are
354    /// almost certainly wrong.
355    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
356    #[serde(default)]
357    pub name: Option<String>,
358    /// Specify whether the ConfigMap or its key must be defined
359    #[serde(default)]
360    pub optional: Option<bool>,
361}
362
363#[derive(Debug, Clone, Serialize, Deserialize)]
364pub struct PodMonitorPodMetricsEndpointsItemOauth2ClientIdSecret {
365    /// The key of the secret to select from.  Must be a valid secret key.
366    pub key: String,
367    /// Name of the referent.
368    /// This field is effectively required, but due to backwards compatibility is
369    /// allowed to be empty. Instances of this type with an empty value here are
370    /// almost certainly wrong.
371    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
372    #[serde(default)]
373    pub name: Option<String>,
374    /// Specify whether the Secret or its key must be defined
375    #[serde(default)]
376    pub optional: Option<bool>,
377}
378
379#[derive(Debug, Clone, Serialize, Deserialize)]
380pub struct PodMonitorPodMetricsEndpointsItemOauth2ClientId {
381    /// ConfigMap containing data to use for the targets.
382    #[serde(default)]
383    pub config_map: Option<PodMonitorPodMetricsEndpointsItemOauth2ClientIdConfigMap>,
384    /// Secret containing data to use for the targets.
385    #[serde(default)]
386    pub secret: Option<PodMonitorPodMetricsEndpointsItemOauth2ClientIdSecret>,
387}
388
389#[derive(Debug, Clone, Serialize, Deserialize)]
390pub struct PodMonitorPodMetricsEndpointsItemOauth2ClientSecret {
391    /// The key of the secret to select from.  Must be a valid secret key.
392    pub key: String,
393    /// Name of the referent.
394    /// This field is effectively required, but due to backwards compatibility is
395    /// allowed to be empty. Instances of this type with an empty value here are
396    /// almost certainly wrong.
397    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
398    #[serde(default)]
399    pub name: Option<String>,
400    /// Specify whether the Secret or its key must be defined
401    #[serde(default)]
402    pub optional: Option<bool>,
403}
404
405#[derive(Debug, Clone, Serialize, Deserialize)]
406pub struct PodMonitorPodMetricsEndpointsItemOauth2ProxyConnectHeaderValueItem {
407    /// The key of the secret to select from.  Must be a valid secret key.
408    pub key: String,
409    /// Name of the referent.
410    /// This field is effectively required, but due to backwards compatibility is
411    /// allowed to be empty. Instances of this type with an empty value here are
412    /// almost certainly wrong.
413    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
414    #[serde(default)]
415    pub name: Option<String>,
416    /// Specify whether the Secret or its key must be defined
417    #[serde(default)]
418    pub optional: Option<bool>,
419}
420
421#[derive(Debug, Clone, Serialize, Deserialize)]
422pub struct PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCaConfigMap {
423    /// The key to select.
424    pub key: String,
425    /// Name of the referent.
426    /// This field is effectively required, but due to backwards compatibility is
427    /// allowed to be empty. Instances of this type with an empty value here are
428    /// almost certainly wrong.
429    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
430    #[serde(default)]
431    pub name: Option<String>,
432    /// Specify whether the ConfigMap or its key must be defined
433    #[serde(default)]
434    pub optional: Option<bool>,
435}
436
437#[derive(Debug, Clone, Serialize, Deserialize)]
438pub struct PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCaSecret {
439    /// The key of the secret to select from.  Must be a valid secret key.
440    pub key: String,
441    /// Name of the referent.
442    /// This field is effectively required, but due to backwards compatibility is
443    /// allowed to be empty. Instances of this type with an empty value here are
444    /// almost certainly wrong.
445    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
446    #[serde(default)]
447    pub name: Option<String>,
448    /// Specify whether the Secret or its key must be defined
449    #[serde(default)]
450    pub optional: Option<bool>,
451}
452
453#[derive(Debug, Clone, Serialize, Deserialize)]
454pub struct PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCa {
455    /// ConfigMap containing data to use for the targets.
456    #[serde(default)]
457    pub config_map: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCaConfigMap>,
458    /// Secret containing data to use for the targets.
459    #[serde(default)]
460    pub secret: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCaSecret>,
461}
462
463#[derive(Debug, Clone, Serialize, Deserialize)]
464pub struct PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCertConfigMap {
465    /// The key to select.
466    pub key: String,
467    /// Name of the referent.
468    /// This field is effectively required, but due to backwards compatibility is
469    /// allowed to be empty. Instances of this type with an empty value here are
470    /// almost certainly wrong.
471    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
472    #[serde(default)]
473    pub name: Option<String>,
474    /// Specify whether the ConfigMap or its key must be defined
475    #[serde(default)]
476    pub optional: Option<bool>,
477}
478
479#[derive(Debug, Clone, Serialize, Deserialize)]
480pub struct PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCertSecret {
481    /// The key of the secret to select from.  Must be a valid secret key.
482    pub key: String,
483    /// Name of the referent.
484    /// This field is effectively required, but due to backwards compatibility is
485    /// allowed to be empty. Instances of this type with an empty value here are
486    /// almost certainly wrong.
487    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
488    #[serde(default)]
489    pub name: Option<String>,
490    /// Specify whether the Secret or its key must be defined
491    #[serde(default)]
492    pub optional: Option<bool>,
493}
494
495#[derive(Debug, Clone, Serialize, Deserialize)]
496pub struct PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCert {
497    /// ConfigMap containing data to use for the targets.
498    #[serde(default)]
499    pub config_map: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCertConfigMap>,
500    /// Secret containing data to use for the targets.
501    #[serde(default)]
502    pub secret: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCertSecret>,
503}
504
505#[derive(Debug, Clone, Serialize, Deserialize)]
506pub struct PodMonitorPodMetricsEndpointsItemOauth2TlsConfigKeySecret {
507    /// The key of the secret to select from.  Must be a valid secret key.
508    pub key: String,
509    /// Name of the referent.
510    /// This field is effectively required, but due to backwards compatibility is
511    /// allowed to be empty. Instances of this type with an empty value here are
512    /// almost certainly wrong.
513    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
514    #[serde(default)]
515    pub name: Option<String>,
516    /// Specify whether the Secret or its key must be defined
517    #[serde(default)]
518    pub optional: Option<bool>,
519}
520
521#[derive(Debug, Clone, Serialize, Deserialize)]
522pub enum PodMonitorPodMetricsEndpointsItemOauth2TlsConfigMaxVersionKind {
523    #[serde(rename = "TLS10")]
524    TLS10,
525    #[serde(rename = "TLS11")]
526    TLS11,
527    #[serde(rename = "TLS12")]
528    TLS12,
529    #[serde(rename = "TLS13")]
530    TLS13,
531}
532
533#[derive(Debug, Clone, Serialize, Deserialize)]
534pub enum PodMonitorPodMetricsEndpointsItemOauth2TlsConfigMinVersionKind {
535    #[serde(rename = "TLS10")]
536    TLS10,
537    #[serde(rename = "TLS11")]
538    TLS11,
539    #[serde(rename = "TLS12")]
540    TLS12,
541    #[serde(rename = "TLS13")]
542    TLS13,
543}
544
545#[derive(Debug, Clone, Serialize, Deserialize)]
546pub struct PodMonitorPodMetricsEndpointsItemOauth2TlsConfig {
547    /// Certificate authority used when verifying server certificates.
548    #[serde(default)]
549    pub ca: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCa>,
550    /// Client certificate to present when doing client-authentication.
551    #[serde(default)]
552    pub cert: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCert>,
553    /// Disable target certificate validation.
554    #[serde(default)]
555    pub insecure_skip_verify: Option<bool>,
556    /// Secret containing the client key file for the targets.
557    #[serde(default)]
558    pub key_secret: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfigKeySecret>,
559    /// Maximum acceptable TLS version.
560    /// 
561    /// It requires Prometheus >= v2.41.0.
562    #[serde(default)]
563    pub max_version: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfigMaxVersionKind>,
564    /// Minimum acceptable TLS version.
565    /// 
566    /// It requires Prometheus >= v2.35.0.
567    #[serde(default)]
568    pub min_version: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfigMinVersionKind>,
569    /// Used to verify the hostname for the targets.
570    #[serde(default)]
571    pub server_name: Option<String>,
572}
573
574#[derive(Debug, Clone, Serialize, Deserialize)]
575pub struct PodMonitorPodMetricsEndpointsItemOauth2 {
576    /// `clientId` specifies a key of a Secret or ConfigMap containing the
577    /// OAuth2 client's ID.
578    pub client_id: PodMonitorPodMetricsEndpointsItemOauth2ClientId,
579    /// `clientSecret` specifies a key of a Secret containing the OAuth2
580    /// client's secret.
581    pub client_secret: PodMonitorPodMetricsEndpointsItemOauth2ClientSecret,
582    /// `endpointParams` configures the HTTP parameters to append to the token
583    /// URL.
584    #[serde(default)]
585    pub endpoint_params: Option<std::collections::HashMap<String, String>>,
586    /// `noProxy` is a comma-separated string that can contain IPs, CIDR notation, domain names
587    /// that should be excluded from proxying. IP and domain names can
588    /// contain port numbers.
589    /// 
590    /// It requires Prometheus >= v2.43.0 or Alertmanager >= 0.25.0.
591    #[serde(default)]
592    pub no_proxy: Option<String>,
593    /// ProxyConnectHeader optionally specifies headers to send to
594    /// proxies during CONNECT requests.
595    /// 
596    /// It requires Prometheus >= v2.43.0 or Alertmanager >= 0.25.0.
597    #[serde(default)]
598    pub proxy_connect_header: Option<std::collections::HashMap<String, Vec<PodMonitorPodMetricsEndpointsItemOauth2ProxyConnectHeaderValueItem>>>,
599    /// Whether to use the proxy configuration defined by environment variables (HTTP_PROXY, HTTPS_PROXY, and NO_PROXY).
600    /// 
601    /// It requires Prometheus >= v2.43.0 or Alertmanager >= 0.25.0.
602    #[serde(default)]
603    pub proxy_from_environment: Option<bool>,
604    /// `proxyURL` defines the HTTP proxy server to use.
605    #[serde(default)]
606    pub proxy_url: Option<String>,
607    /// `scopes` defines the OAuth2 scopes used for the token request.
608    #[serde(default)]
609    pub scopes: Option<Vec<String>>,
610    /// TLS configuration to use when connecting to the OAuth2 server.
611    /// It requires Prometheus >= v2.43.0.
612    #[serde(default)]
613    pub tls_config: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfig>,
614    /// `tokenURL` configures the URL to fetch the token from.
615    pub token_url: String,
616}
617
618#[derive(Debug, Clone, Serialize, Deserialize)]
619pub enum PodMonitorPodMetricsEndpointsItemRelabelingsItemActionKind {
620    #[serde(rename = "replace")]
621    Replace,
622    #[serde(rename = "Replace")]
623    ReplaceV1,
624    #[serde(rename = "keep")]
625    Keep,
626    #[serde(rename = "Keep")]
627    KeepV1,
628    #[serde(rename = "drop")]
629    Drop,
630    #[serde(rename = "Drop")]
631    DropV1,
632    #[serde(rename = "hashmod")]
633    Hashmod,
634    #[serde(rename = "HashMod")]
635    HashMod,
636    #[serde(rename = "labelmap")]
637    Labelmap,
638    #[serde(rename = "LabelMap")]
639    LabelMap,
640    #[serde(rename = "labeldrop")]
641    Labeldrop,
642    #[serde(rename = "LabelDrop")]
643    LabelDrop,
644    #[serde(rename = "labelkeep")]
645    Labelkeep,
646    #[serde(rename = "LabelKeep")]
647    LabelKeep,
648    #[serde(rename = "lowercase")]
649    Lowercase,
650    #[serde(rename = "Lowercase")]
651    LowercaseV1,
652    #[serde(rename = "uppercase")]
653    Uppercase,
654    #[serde(rename = "Uppercase")]
655    UppercaseV1,
656    #[serde(rename = "keepequal")]
657    Keepequal,
658    #[serde(rename = "KeepEqual")]
659    KeepEqual,
660    #[serde(rename = "dropequal")]
661    Dropequal,
662    #[serde(rename = "DropEqual")]
663    DropEqual,
664}
665
666#[derive(Debug, Clone, Serialize, Deserialize)]
667pub struct PodMonitorPodMetricsEndpointsItemRelabelingsItem {
668    /// Action to perform based on the regex matching.
669    /// 
670    /// `Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0.
671    /// `DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0.
672    /// 
673    /// Default: "Replace"
674    #[serde(default)]
675    pub action: Option<PodMonitorPodMetricsEndpointsItemRelabelingsItemActionKind>,
676    /// Modulus to take of the hash of the source label values.
677    /// 
678    /// Only applicable when the action is `HashMod`.
679    #[serde(default)]
680    pub modulus: Option<i64>,
681    /// Regular expression against which the extracted value is matched.
682    #[serde(default)]
683    pub regex: Option<String>,
684    /// Replacement value against which a Replace action is performed if the
685    /// regular expression matches.
686    /// 
687    /// Regex capture groups are available.
688    #[serde(default)]
689    pub replacement: Option<String>,
690    /// Separator is the string between concatenated SourceLabels.
691    #[serde(default)]
692    pub separator: Option<String>,
693    /// The source labels select values from existing labels. Their content is
694    /// concatenated using the configured Separator and matched against the
695    /// configured regular expression.
696    #[serde(default)]
697    pub source_labels: Option<Vec<String>>,
698    /// Label to which the resulting string is written in a replacement.
699    /// 
700    /// It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`,
701    /// `KeepEqual` and `DropEqual` actions.
702    /// 
703    /// Regex capture groups are available.
704    #[serde(default)]
705    pub target_label: Option<String>,
706}
707
708#[derive(Debug, Clone, Serialize, Deserialize)]
709pub enum PodMonitorPodMetricsEndpointsItemSchemeKind {
710    #[serde(rename = "http")]
711    Http,
712    #[serde(rename = "https")]
713    Https,
714}
715
716#[derive(Debug, Clone, Serialize, Deserialize)]
717pub struct PodMonitorPodMetricsEndpointsItemTlsConfigCaConfigMap {
718    /// The key to select.
719    pub key: String,
720    /// Name of the referent.
721    /// This field is effectively required, but due to backwards compatibility is
722    /// allowed to be empty. Instances of this type with an empty value here are
723    /// almost certainly wrong.
724    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
725    #[serde(default)]
726    pub name: Option<String>,
727    /// Specify whether the ConfigMap or its key must be defined
728    #[serde(default)]
729    pub optional: Option<bool>,
730}
731
732#[derive(Debug, Clone, Serialize, Deserialize)]
733pub struct PodMonitorPodMetricsEndpointsItemTlsConfigCaSecret {
734    /// The key of the secret to select from.  Must be a valid secret key.
735    pub key: String,
736    /// Name of the referent.
737    /// This field is effectively required, but due to backwards compatibility is
738    /// allowed to be empty. Instances of this type with an empty value here are
739    /// almost certainly wrong.
740    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
741    #[serde(default)]
742    pub name: Option<String>,
743    /// Specify whether the Secret or its key must be defined
744    #[serde(default)]
745    pub optional: Option<bool>,
746}
747
748#[derive(Debug, Clone, Serialize, Deserialize)]
749pub struct PodMonitorPodMetricsEndpointsItemTlsConfigCa {
750    /// ConfigMap containing data to use for the targets.
751    #[serde(default)]
752    pub config_map: Option<PodMonitorPodMetricsEndpointsItemTlsConfigCaConfigMap>,
753    /// Secret containing data to use for the targets.
754    #[serde(default)]
755    pub secret: Option<PodMonitorPodMetricsEndpointsItemTlsConfigCaSecret>,
756}
757
758#[derive(Debug, Clone, Serialize, Deserialize)]
759pub struct PodMonitorPodMetricsEndpointsItemTlsConfigCertConfigMap {
760    /// The key to select.
761    pub key: String,
762    /// Name of the referent.
763    /// This field is effectively required, but due to backwards compatibility is
764    /// allowed to be empty. Instances of this type with an empty value here are
765    /// almost certainly wrong.
766    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
767    #[serde(default)]
768    pub name: Option<String>,
769    /// Specify whether the ConfigMap or its key must be defined
770    #[serde(default)]
771    pub optional: Option<bool>,
772}
773
774#[derive(Debug, Clone, Serialize, Deserialize)]
775pub struct PodMonitorPodMetricsEndpointsItemTlsConfigCertSecret {
776    /// The key of the secret to select from.  Must be a valid secret key.
777    pub key: String,
778    /// Name of the referent.
779    /// This field is effectively required, but due to backwards compatibility is
780    /// allowed to be empty. Instances of this type with an empty value here are
781    /// almost certainly wrong.
782    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
783    #[serde(default)]
784    pub name: Option<String>,
785    /// Specify whether the Secret or its key must be defined
786    #[serde(default)]
787    pub optional: Option<bool>,
788}
789
790#[derive(Debug, Clone, Serialize, Deserialize)]
791pub struct PodMonitorPodMetricsEndpointsItemTlsConfigCert {
792    /// ConfigMap containing data to use for the targets.
793    #[serde(default)]
794    pub config_map: Option<PodMonitorPodMetricsEndpointsItemTlsConfigCertConfigMap>,
795    /// Secret containing data to use for the targets.
796    #[serde(default)]
797    pub secret: Option<PodMonitorPodMetricsEndpointsItemTlsConfigCertSecret>,
798}
799
800#[derive(Debug, Clone, Serialize, Deserialize)]
801pub struct PodMonitorPodMetricsEndpointsItemTlsConfigKeySecret {
802    /// The key of the secret to select from.  Must be a valid secret key.
803    pub key: String,
804    /// Name of the referent.
805    /// This field is effectively required, but due to backwards compatibility is
806    /// allowed to be empty. Instances of this type with an empty value here are
807    /// almost certainly wrong.
808    /// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
809    #[serde(default)]
810    pub name: Option<String>,
811    /// Specify whether the Secret or its key must be defined
812    #[serde(default)]
813    pub optional: Option<bool>,
814}
815
816#[derive(Debug, Clone, Serialize, Deserialize)]
817pub enum PodMonitorPodMetricsEndpointsItemTlsConfigMaxVersionKind {
818    #[serde(rename = "TLS10")]
819    TLS10,
820    #[serde(rename = "TLS11")]
821    TLS11,
822    #[serde(rename = "TLS12")]
823    TLS12,
824    #[serde(rename = "TLS13")]
825    TLS13,
826}
827
828#[derive(Debug, Clone, Serialize, Deserialize)]
829pub enum PodMonitorPodMetricsEndpointsItemTlsConfigMinVersionKind {
830    #[serde(rename = "TLS10")]
831    TLS10,
832    #[serde(rename = "TLS11")]
833    TLS11,
834    #[serde(rename = "TLS12")]
835    TLS12,
836    #[serde(rename = "TLS13")]
837    TLS13,
838}
839
840#[derive(Debug, Clone, Serialize, Deserialize)]
841pub struct PodMonitorPodMetricsEndpointsItemTlsConfig {
842    /// Certificate authority used when verifying server certificates.
843    #[serde(default)]
844    pub ca: Option<PodMonitorPodMetricsEndpointsItemTlsConfigCa>,
845    /// Client certificate to present when doing client-authentication.
846    #[serde(default)]
847    pub cert: Option<PodMonitorPodMetricsEndpointsItemTlsConfigCert>,
848    /// Disable target certificate validation.
849    #[serde(default)]
850    pub insecure_skip_verify: Option<bool>,
851    /// Secret containing the client key file for the targets.
852    #[serde(default)]
853    pub key_secret: Option<PodMonitorPodMetricsEndpointsItemTlsConfigKeySecret>,
854    /// Maximum acceptable TLS version.
855    /// 
856    /// It requires Prometheus >= v2.41.0.
857    #[serde(default)]
858    pub max_version: Option<PodMonitorPodMetricsEndpointsItemTlsConfigMaxVersionKind>,
859    /// Minimum acceptable TLS version.
860    /// 
861    /// It requires Prometheus >= v2.35.0.
862    #[serde(default)]
863    pub min_version: Option<PodMonitorPodMetricsEndpointsItemTlsConfigMinVersionKind>,
864    /// Used to verify the hostname for the targets.
865    #[serde(default)]
866    pub server_name: Option<String>,
867}
868
869#[derive(Debug, Clone, Serialize, Deserialize)]
870pub struct PodMonitorPodMetricsEndpointsItem {
871    /// `authorization` configures the Authorization header credentials to use when
872    /// scraping the target.
873    /// 
874    /// Cannot be set at the same time as `basicAuth`, or `oauth2`.
875    #[serde(default)]
876    pub authorization: Option<PodMonitorPodMetricsEndpointsItemAuthorization>,
877    /// `basicAuth` configures the Basic Authentication credentials to use when
878    /// scraping the target.
879    /// 
880    /// Cannot be set at the same time as `authorization`, or `oauth2`.
881    #[serde(default)]
882    pub basic_auth: Option<PodMonitorPodMetricsEndpointsItemBasicAuth>,
883    /// `bearerTokenSecret` specifies a key of a Secret containing the bearer
884    /// token for scraping targets. The secret needs to be in the same namespace
885    /// as the PodMonitor object and readable by the Prometheus Operator.
886    /// 
887    /// Deprecated: use `authorization` instead.
888    #[serde(default)]
889    pub bearer_token_secret: Option<PodMonitorPodMetricsEndpointsItemBearerTokenSecret>,
890    /// `enableHttp2` can be used to disable HTTP2 when scraping the target.
891    #[serde(default)]
892    pub enable_http2: Option<bool>,
893    /// When true, the pods which are not running (e.g. either in Failed or
894    /// Succeeded state) are dropped during the target discovery.
895    /// 
896    /// If unset, the filtering is enabled.
897    /// 
898    /// More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase
899    #[serde(default)]
900    pub filter_running: Option<bool>,
901    /// `followRedirects` defines whether the scrape requests should follow HTTP
902    /// 3xx redirects.
903    #[serde(default)]
904    pub follow_redirects: Option<bool>,
905    /// When true, `honorLabels` preserves the metric's labels when they collide
906    /// with the target's labels.
907    #[serde(default)]
908    pub honor_labels: Option<bool>,
909    /// `honorTimestamps` controls whether Prometheus preserves the timestamps
910    /// when exposed by the target.
911    #[serde(default)]
912    pub honor_timestamps: Option<bool>,
913    /// Interval at which Prometheus scrapes the metrics from the target.
914    /// 
915    /// If empty, Prometheus uses the global scrape interval.
916    #[serde(default)]
917    pub interval: Option<String>,
918    /// `metricRelabelings` configures the relabeling rules to apply to the
919    /// samples before ingestion.
920    #[serde(default)]
921    pub metric_relabelings: Option<Vec<PodMonitorPodMetricsEndpointsItemMetricRelabelingsItem>>,
922    /// `oauth2` configures the OAuth2 settings to use when scraping the target.
923    /// 
924    /// It requires Prometheus >= 2.27.0.
925    /// 
926    /// Cannot be set at the same time as `authorization`, or `basicAuth`.
927    #[serde(default)]
928    pub oauth2: Option<PodMonitorPodMetricsEndpointsItemOauth2>,
929    /// `params` define optional HTTP URL parameters.
930    #[serde(default)]
931    pub params: Option<std::collections::HashMap<String, Vec<String>>>,
932    /// HTTP path from which to scrape for metrics.
933    /// 
934    /// If empty, Prometheus uses the default value (e.g. `/metrics`).
935    #[serde(default)]
936    pub path: Option<String>,
937    /// The `Pod` port name which exposes the endpoint.
938    /// 
939    /// It takes precedence over the `portNumber` and `targetPort` fields.
940    #[serde(default)]
941    pub port: Option<String>,
942    /// The `Pod` port number which exposes the endpoint.
943    #[serde(default)]
944    pub port_number: Option<i64>,
945    /// `proxyURL` configures the HTTP Proxy URL (e.g.
946    /// "http://proxyserver:2195") to go through when scraping the target.
947    #[serde(default)]
948    pub proxy_url: Option<String>,
949    /// `relabelings` configures the relabeling rules to apply the target's
950    /// metadata labels.
951    /// 
952    /// The Operator automatically adds relabelings for a few standard Kubernetes fields.
953    /// 
954    /// The original scrape job's name is available via the `__tmp_prometheus_job_name` label.
955    /// 
956    /// More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
957    #[serde(default)]
958    pub relabelings: Option<Vec<PodMonitorPodMetricsEndpointsItemRelabelingsItem>>,
959    /// HTTP scheme to use for scraping.
960    /// 
961    /// `http` and `https` are the expected values unless you rewrite the
962    /// `__scheme__` label via relabeling.
963    /// 
964    /// If empty, Prometheus uses the default value `http`.
965    #[serde(default)]
966    pub scheme: Option<PodMonitorPodMetricsEndpointsItemSchemeKind>,
967    /// Timeout after which Prometheus considers the scrape to be failed.
968    /// 
969    /// If empty, Prometheus uses the global scrape timeout unless it is less
970    /// than the target's scrape interval value in which the latter is used.
971    #[serde(default)]
972    pub scrape_timeout: Option<String>,
973    /// Name or number of the target port of the `Pod` object behind the Service, the
974    /// port must be specified with container port property.
975    /// 
976    /// Deprecated: use 'port' or 'portNumber' instead.
977    #[serde(default)]
978    pub target_port: Option<serde_json::Value>,
979    /// TLS configuration to use when scraping the target.
980    #[serde(default)]
981    pub tls_config: Option<PodMonitorPodMetricsEndpointsItemTlsConfig>,
982    /// `trackTimestampsStaleness` defines whether Prometheus tracks staleness of
983    /// the metrics that have an explicit timestamp present in scraped data.
984    /// Has no effect if `honorTimestamps` is false.
985    /// 
986    /// It requires Prometheus >= v2.48.0.
987    #[serde(default)]
988    pub track_timestamps_staleness: Option<bool>,
989}
990
991#[derive(Debug, Clone, Serialize, Deserialize)]
992pub enum PodMonitorScrapeProtocolsItemKind {
993    #[serde(rename = "PrometheusProto")]
994    PrometheusProto,
995    #[serde(rename = "OpenMetricsText0.0.1")]
996    OpenMetricsText001,
997    #[serde(rename = "OpenMetricsText1.0.0")]
998    OpenMetricsText100,
999    #[serde(rename = "PrometheusText0.0.4")]
1000    PrometheusText004,
1001    #[serde(rename = "PrometheusText1.0.0")]
1002    PrometheusText100,
1003}
1004
1005#[derive(Debug, Clone, Serialize, Deserialize)]
1006pub struct PodMonitorSelectorMatchExpressionsItem {
1007    /// key is the label key that the selector applies to.
1008    pub key: String,
1009    /// operator represents a key's relationship to a set of values.
1010    /// Valid operators are In, NotIn, Exists and DoesNotExist.
1011    pub operator: String,
1012    /// values is an array of string values. If the operator is In or NotIn,
1013    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
1014    /// the values array must be empty. This array is replaced during a strategic
1015    /// merge patch.
1016    #[serde(default)]
1017    pub values: Option<Vec<String>>,
1018}
1019
1020#[derive(Debug, Clone, Serialize, Deserialize)]
1021pub struct PodMonitorSelector {
1022    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
1023    #[serde(default)]
1024    pub match_expressions: Option<Vec<PodMonitorSelectorMatchExpressionsItem>>,
1025    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
1026    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
1027    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
1028    #[serde(default)]
1029    pub match_labels: Option<std::collections::HashMap<String, String>>,
1030}
1031
1032#[derive(Debug, Clone, Serialize, Deserialize)]
1033pub enum PodMonitorSelectorMechanismKind {
1034    #[serde(rename = "RelabelConfig")]
1035    RelabelConfig,
1036    #[serde(rename = "RoleSelector")]
1037    RoleSelector,
1038}
1039
1040
1041// ── Render metadata (consumed by tatara-render) ──────────
1042
1043impl tatara_lisp::RenderableDomain for PodMonitorSpec {
1044    const API_VERSION: &'static str = "monitoring.coreos.com/v1";
1045    const KIND: &'static str = "PodMonitor";
1046    const NAME_FIELD: &'static str = "name";
1047}
1048
1049// ── Documentation metadata (consumed by tatara-doc / IDE) ──
1050
1051impl tatara_lisp::DocumentedDomain for PodMonitorSpec {
1052    const DOCSTRING: &'static str = "The `PodMonitor` custom resource definition (CRD) defines how `Prometheus` and `PrometheusAgent` can scrape metrics from a group of pods. Among other things, it allows to specify: * The pods to scrape via label selectors. * The container ports to scrape. * Authentication credentials to use. * Target and metric relabeling. `Prometheus` and `PrometheusAgent` objects select `PodMonitor` objects using label and namespace selectors.";
1053    const FIELD_DOCS: &'static [(&'static str, &'static str)] = &[
1054        ("attach_metadata", "`attachMetadata` defines additional metadata which is added to the discovered targets. It requires Prometheus >= v2.35.0."),
1055        ("body_size_limit", "When defined, bodySizeLimit specifies a job level limit on the size of uncompressed response body that will be accepted by Prometheus. It requires Prometheus >= v2.28.0."),
1056        ("fallback_scrape_protocol", "The protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type. It requires Prometheus >= v3.0.0."),
1057        ("job_label", "The label to use to retrieve the job name from. `jobLabel` selects the label from the associated Kubernetes `Pod` object which will be used as the `job` label for all metrics. For example if `jobLabel` is set to `foo` and the Kubernetes `Pod` object is labeled with `foo: bar`, then Prometheus adds the `job=\"bar\"` label to all ingested metrics. If the value of this field is empty, the `job` label of the metrics defaults to the namespace and name of the PodMonitor object (e.g. `<namespace>/<name>`)."),
1058        ("keep_dropped_targets", "Per-scrape limit on the number of targets dropped by relabeling that will be kept in memory. 0 means no limit. It requires Prometheus >= v2.47.0."),
1059        ("label_limit", "Per-scrape limit on number of labels that will be accepted for a sample. It requires Prometheus >= v2.27.0."),
1060        ("label_name_length_limit", "Per-scrape limit on length of labels name that will be accepted for a sample. It requires Prometheus >= v2.27.0."),
1061        ("label_value_length_limit", "Per-scrape limit on length of labels value that will be accepted for a sample. It requires Prometheus >= v2.27.0."),
1062        ("namespace_selector", "`namespaceSelector` defines in which namespace(s) Prometheus should discover the pods. By default, the pods are discovered in the same namespace as the `PodMonitor` object but it is possible to select pods across different/all namespaces."),
1063        ("native_histogram_bucket_limit", "If there are more than this many buckets in a native histogram, buckets will be merged to stay within the limit. It requires Prometheus >= v2.45.0."),
1064        ("native_histogram_min_bucket_factor", "If the growth factor of one bucket to the next is smaller than this, buckets will be merged to increase the factor sufficiently. It requires Prometheus >= v2.50.0."),
1065        ("pod_metrics_endpoints", "Defines how to scrape metrics from the selected pods."),
1066        ("pod_target_labels", "`podTargetLabels` defines the labels which are transferred from the associated Kubernetes `Pod` object onto the ingested metrics."),
1067        ("sample_limit", "`sampleLimit` defines a per-scrape limit on the number of scraped samples that will be accepted."),
1068        ("scrape_class", "The scrape class to apply."),
1069        ("scrape_classic_histograms", "Whether to scrape a classic histogram that is also exposed as a native histogram. It requires Prometheus >= v2.45.0."),
1070        ("scrape_protocols", "`scrapeProtocols` defines the protocols to negotiate during a scrape. It tells clients the protocols supported by Prometheus in order of preference (from most to least preferred). If unset, Prometheus uses its default value. It requires Prometheus >= v2.49.0."),
1071        ("selector", "Label selector to select the Kubernetes `Pod` objects to scrape metrics from."),
1072        ("selector_mechanism", "Mechanism used to select the endpoints to scrape. By default, the selection process relies on relabel configurations to filter the discovered targets. Alternatively, you can opt in for role selectors, which may offer better efficiency in large clusters. Which strategy is best for your use case needs to be carefully evaluated. It requires Prometheus >= v2.17.0."),
1073        ("target_limit", "`targetLimit` defines a limit on the number of scraped targets that will be accepted."),
1074    ];
1075}
1076
1077// ── Default capabilities (Layers 3/4/7/8/9/10/11/12) ──
1078
1079tatara_lisp::impl_default_capabilities!(PodMonitorSpec);
1080
1081// ── Attestation metadata (consumed by tameshi BLAKE3 chain) ──
1082
1083impl tatara_lisp::AttestableDomain for PodMonitorSpec {
1084    const ATTESTATION_NAMESPACE: &'static str = "monitoring.coreos.com";
1085}
1086
1087// ── Schema metadata (consumed by IDEs / openapi exporters) ──
1088
1089impl tatara_lisp::SchematicDomain for PodMonitorSpec {
1090    const SCHEMA_JSON: &'static str = "{\"description\":\"The `PodMonitor` custom resource definition (CRD) defines how `Prometheus` and `PrometheusAgent` can scrape metrics from a group of pods.\\nAmong other things, it allows to specify:\\n* The pods to scrape via label selectors.\\n* The container ports to scrape.\\n* Authentication credentials to use.\\n* Target and metric relabeling.\\n\\n`Prometheus` and `PrometheusAgent` objects select `PodMonitor` objects using label and namespace selectors.\",\"properties\":{\"apiVersion\":{\"description\":\"APIVersion defines the versioned schema of this representation of an object.\\nServers should convert recognized schemas to the latest internal value, and\\nmay reject unrecognized values.\\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources\",\"type\":\"string\"},\"kind\":{\"description\":\"Kind is a string value representing the REST resource this object represents.\\nServers may infer this from the endpoint the client submits requests to.\\nCannot be updated.\\nIn CamelCase.\\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds\",\"type\":\"string\"},\"metadata\":{\"type\":\"object\"},\"spec\":{\"description\":\"Specification of desired Pod selection for target discovery by Prometheus.\",\"properties\":{\"attachMetadata\":{\"description\":\"`attachMetadata` defines additional metadata which is added to the\\ndiscovered targets.\\n\\nIt requires Prometheus >= v2.35.0.\",\"properties\":{\"node\":{\"description\":\"When set to true, Prometheus attaches node metadata to the discovered\\ntargets.\\n\\nThe Prometheus service account must have the `list` and `watch`\\npermissions on the `Nodes` objects.\",\"type\":\"boolean\"}},\"type\":\"object\"},\"bodySizeLimit\":{\"description\":\"When defined, bodySizeLimit specifies a job level limit on the size\\nof uncompressed response body that will be accepted by Prometheus.\\n\\nIt requires Prometheus >= v2.28.0.\",\"pattern\":\"(^0|([0-9]*[.])?[0-9]+((K|M|G|T|E|P)i?)?B)$\",\"type\":\"string\"},\"fallbackScrapeProtocol\":{\"description\":\"The protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type.\\n\\nIt requires Prometheus >= v3.0.0.\",\"enum\":[\"PrometheusProto\",\"OpenMetricsText0.0.1\",\"OpenMetricsText1.0.0\",\"PrometheusText0.0.4\",\"PrometheusText1.0.0\"],\"type\":\"string\"},\"jobLabel\":{\"description\":\"The label to use to retrieve the job name from.\\n`jobLabel` selects the label from the associated Kubernetes `Pod`\\nobject which will be used as the `job` label for all metrics.\\n\\nFor example if `jobLabel` is set to `foo` and the Kubernetes `Pod`\\nobject is labeled with `foo: bar`, then Prometheus adds the `job=\\\"bar\\\"`\\nlabel to all ingested metrics.\\n\\nIf the value of this field is empty, the `job` label of the metrics\\ndefaults to the namespace and name of the PodMonitor object (e.g. `<namespace>/<name>`).\",\"type\":\"string\"},\"keepDroppedTargets\":{\"description\":\"Per-scrape limit on the number of targets dropped by relabeling\\nthat will be kept in memory. 0 means no limit.\\n\\nIt requires Prometheus >= v2.47.0.\",\"format\":\"int64\",\"type\":\"integer\"},\"labelLimit\":{\"description\":\"Per-scrape limit on number of labels that will be accepted for a sample.\\n\\nIt requires Prometheus >= v2.27.0.\",\"format\":\"int64\",\"type\":\"integer\"},\"labelNameLengthLimit\":{\"description\":\"Per-scrape limit on length of labels name that will be accepted for a sample.\\n\\nIt requires Prometheus >= v2.27.0.\",\"format\":\"int64\",\"type\":\"integer\"},\"labelValueLengthLimit\":{\"description\":\"Per-scrape limit on length of labels value that will be accepted for a sample.\\n\\nIt requires Prometheus >= v2.27.0.\",\"format\":\"int64\",\"type\":\"integer\"},\"namespaceSelector\":{\"description\":\"`namespaceSelector` defines in which namespace(s) Prometheus should discover the pods.\\nBy default, the pods are discovered in the same namespace as the `PodMonitor` object but it is possible to select pods across different/all namespaces.\",\"properties\":{\"any\":{\"description\":\"Boolean describing whether all namespaces are selected in contrast to a\\nlist restricting them.\",\"type\":\"boolean\"},\"matchNames\":{\"description\":\"List of namespace names to select from.\",\"items\":{\"type\":\"string\"},\"type\":\"array\"}},\"type\":\"object\"},\"nativeHistogramBucketLimit\":{\"description\":\"If there are more than this many buckets in a native histogram,\\nbuckets will be merged to stay within the limit.\\nIt requires Prometheus >= v2.45.0.\",\"format\":\"int64\",\"type\":\"integer\"},\"nativeHistogramMinBucketFactor\":{\"anyOf\":[{\"type\":\"integer\"},{\"type\":\"string\"}],\"description\":\"If the growth factor of one bucket to the next is smaller than this,\\nbuckets will be merged to increase the factor sufficiently.\\nIt requires Prometheus >= v2.50.0.\",\"pattern\":\"^(\\\\+|-)?(([0-9]+(\\\\.[0-9]*)?)|(\\\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\\\+|-)?(([0-9]+(\\\\.[0-9]*)?)|(\\\\.[0-9]+))))?$\",\"x-kubernetes-int-or-string\":true},\"podMetricsEndpoints\":{\"description\":\"Defines how to scrape metrics from the selected pods.\",\"items\":{\"description\":\"PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by\\nPrometheus.\",\"properties\":{\"authorization\":{\"description\":\"`authorization` configures the Authorization header credentials to use when\\nscraping the target.\\n\\nCannot be set at the same time as `basicAuth`, or `oauth2`.\",\"properties\":{\"credentials\":{\"description\":\"Selects a key of a Secret in the namespace that contains the credentials for authentication.\",\"properties\":{\"key\":{\"description\":\"The key of the secret to select from.  Must be a valid secret key.\",\"type\":\"string\"},\"name\":{\"default\":\"\",\"description\":\"Name of the referent.\\nThis field is effectively required, but due to backwards compatibility is\\nallowed to be empty. Instances of this type with an empty value here are\\nalmost certainly wrong.\\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\",\"type\":\"string\"},\"optional\":{\"description\":\"Specify whether the Secret or its key must be defined\",\"type\":\"boolean\"}},\"required\":[\"key\"],\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"},\"type\":{\"description\":\"Defines the authentication type. The value is case-insensitive.\\n\\n\\\"Basic\\\" is not a supported value.\\n\\nDefault: \\\"Bearer\\\"\",\"type\":\"string\"}},\"type\":\"object\"},\"basicAuth\":{\"description\":\"`basicAuth` configures the Basic Authentication credentials to use when\\nscraping the target.\\n\\nCannot be set at the same time as `authorization`, or `oauth2`.\",\"properties\":{\"password\":{\"description\":\"`password` specifies a key of a Secret containing the password for\\nauthentication.\",\"properties\":{\"key\":{\"description\":\"The key of the secret to select from.  Must be a valid secret key.\",\"type\":\"string\"},\"name\":{\"default\":\"\",\"description\":\"Name of the referent.\\nThis field is effectively required, but due to backwards compatibility is\\nallowed to be empty. Instances of this type with an empty value here are\\nalmost certainly wrong.\\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\",\"type\":\"string\"},\"optional\":{\"description\":\"Specify whether the Secret or its key must be defined\",\"type\":\"boolean\"}},\"required\":[\"key\"],\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"},\"username\":{\"description\":\"`username` specifies a key of a Secret containing the username for\\nauthentication.\",\"properties\":{\"key\":{\"description\":\"The key of the secret to select from.  Must be a valid secret key.\",\"type\":\"string\"},\"name\":{\"default\":\"\",\"description\":\"Name of the referent.\\nThis field is effectively required, but due to backwards compatibility is\\nallowed to be empty. Instances of this type with an empty value here are\\nalmost certainly wrong.\\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\",\"type\":\"string\"},\"optional\":{\"description\":\"Specify whether the Secret or its key must be defined\",\"type\":\"boolean\"}},\"required\":[\"key\"],\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"}},\"type\":\"object\"},\"bearerTokenSecret\":{\"description\":\"`bearerTokenSecret` specifies a key of a Secret containing the bearer\\ntoken for scraping targets. The secret needs to be in the same namespace\\nas the PodMonitor object and readable by the Prometheus Operator.\\n\\nDeprecated: use `authorization` instead.\",\"properties\":{\"key\":{\"description\":\"The key of the secret to select from.  Must be a valid secret key.\",\"type\":\"string\"},\"name\":{\"default\":\"\",\"description\":\"Name of the referent.\\nThis field is effectively required, but due to backwards compatibility is\\nallowed to be empty. Instances of this type with an empty value here are\\nalmost certainly wrong.\\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\",\"type\":\"string\"},\"optional\":{\"description\":\"Specify whether the Secret or its key must be defined\",\"type\":\"boolean\"}},\"required\":[\"key\"],\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"},\"enableHttp2\":{\"description\":\"`enableHttp2` can be used to disable HTTP2 when scraping the target.\",\"type\":\"boolean\"},\"filterRunning\":{\"description\":\"When true, the pods which are not running (e.g. either in Failed or\\nSucceeded state) are dropped during the target discovery.\\n\\nIf unset, the filtering is enabled.\\n\\nMore info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase\",\"type\":\"boolean\"},\"followRedirects\":{\"description\":\"`followRedirects` defines whether the scrape requests should follow HTTP\\n3xx redirects.\",\"type\":\"boolean\"},\"honorLabels\":{\"description\":\"When true, `honorLabels` preserves the metric's labels when they collide\\nwith the target's labels.\",\"type\":\"boolean\"},\"honorTimestamps\":{\"description\":\"`honorTimestamps` controls whether Prometheus preserves the timestamps\\nwhen exposed by the target.\",\"type\":\"boolean\"},\"interval\":{\"description\":\"Interval at which Prometheus scrapes the metrics from the target.\\n\\nIf empty, Prometheus uses the global scrape interval.\",\"pattern\":\"^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$\",\"type\":\"string\"},\"metricRelabelings\":{\"description\":\"`metricRelabelings` configures the relabeling rules to apply to the\\nsamples before ingestion.\",\"items\":{\"description\":\"RelabelConfig allows dynamic rewriting of the label set for targets, alerts,\\nscraped samples and remote write samples.\\n\\nMore info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config\",\"properties\":{\"action\":{\"default\":\"replace\",\"description\":\"Action to perform based on the regex matching.\\n\\n`Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0.\\n`DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0.\\n\\nDefault: \\\"Replace\\\"\",\"enum\":[\"replace\",\"Replace\",\"keep\",\"Keep\",\"drop\",\"Drop\",\"hashmod\",\"HashMod\",\"labelmap\",\"LabelMap\",\"labeldrop\",\"LabelDrop\",\"labelkeep\",\"LabelKeep\",\"lowercase\",\"Lowercase\",\"uppercase\",\"Uppercase\",\"keepequal\",\"KeepEqual\",\"dropequal\",\"DropEqual\"],\"type\":\"string\"},\"modulus\":{\"description\":\"Modulus to take of the hash of the source label values.\\n\\nOnly applicable when the action is `HashMod`.\",\"format\":\"int64\",\"type\":\"integer\"},\"regex\":{\"description\":\"Regular expression against which the extracted value is matched.\",\"type\":\"string\"},\"replacement\":{\"description\":\"Replacement value against which a Replace action is performed if the\\nregular expression matches.\\n\\nRegex capture groups are available.\",\"type\":\"string\"},\"separator\":{\"description\":\"Separator is the string between concatenated SourceLabels.\",\"type\":\"string\"},\"sourceLabels\":{\"description\":\"The source labels select values from existing labels. Their content is\\nconcatenated using the configured Separator and matched against the\\nconfigured regular expression.\",\"items\":{\"description\":\"LabelName is a valid Prometheus label name which may only contain ASCII\\nletters, numbers, as well as underscores.\",\"pattern\":\"^[a-zA-Z_][a-zA-Z0-9_]*$\",\"type\":\"string\"},\"type\":\"array\"},\"targetLabel\":{\"description\":\"Label to which the resulting string is written in a replacement.\\n\\nIt is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`,\\n`KeepEqual` and `DropEqual` actions.\\n\\nRegex capture groups are available.\",\"type\":\"string\"}},\"type\":\"object\"},\"type\":\"array\"},\"oauth2\":{\"description\":\"`oauth2` configures the OAuth2 settings to use when scraping the target.\\n\\nIt requires Prometheus >= 2.27.0.\\n\\nCannot be set at the same time as `authorization`, or `basicAuth`.\",\"properties\":{\"clientId\":{\"description\":\"`clientId` specifies a key of a Secret or ConfigMap containing the\\nOAuth2 client's ID.\",\"properties\":{\"configMap\":{\"description\":\"ConfigMap containing data to use for the targets.\",\"properties\":{\"key\":{\"description\":\"The key to select.\",\"type\":\"string\"},\"name\":{\"default\":\"\",\"description\":\"Name of the referent.\\nThis field is effectively required, but due to backwards compatibility is\\nallowed to be empty. Instances of this type with an empty value here are\\nalmost certainly wrong.\\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\",\"type\":\"string\"},\"optional\":{\"description\":\"Specify whether the ConfigMap or its key must be defined\",\"type\":\"boolean\"}},\"required\":[\"key\"],\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"},\"secret\":{\"description\":\"Secret containing data to use for the targets.\",\"properties\":{\"key\":{\"description\":\"The key of the secret to select from.  Must be a valid secret key.\",\"type\":\"string\"},\"name\":{\"default\":\"\",\"description\":\"Name of the referent.\\nThis field is effectively required, but due to backwards compatibility is\\nallowed to be empty. Instances of this type with an empty value here are\\nalmost certainly wrong.\\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\",\"type\":\"string\"},\"optional\":{\"description\":\"Specify whether the Secret or its key must be defined\",\"type\":\"boolean\"}},\"required\":[\"key\"],\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"}},\"type\":\"object\"},\"clientSecret\":{\"description\":\"`clientSecret` specifies a key of a Secret containing the OAuth2\\nclient's secret.\",\"properties\":{\"key\":{\"description\":\"The key of the secret to select from.  Must be a valid secret key.\",\"type\":\"string\"},\"name\":{\"default\":\"\",\"description\":\"Name of the referent.\\nThis field is effectively required, but due to backwards compatibility is\\nallowed to be empty. Instances of this type with an empty value here are\\nalmost certainly wrong.\\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\",\"type\":\"string\"},\"optional\":{\"description\":\"Specify whether the Secret or its key must be defined\",\"type\":\"boolean\"}},\"required\":[\"key\"],\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"},\"endpointParams\":{\"additionalProperties\":{\"type\":\"string\"},\"description\":\"`endpointParams` configures the HTTP parameters to append to the token\\nURL.\",\"type\":\"object\"},\"noProxy\":{\"description\":\"`noProxy` is a comma-separated string that can contain IPs, CIDR notation, domain names\\nthat should be excluded from proxying. IP and domain names can\\ncontain port numbers.\\n\\nIt requires Prometheus >= v2.43.0 or Alertmanager >= 0.25.0.\",\"type\":\"string\"},\"proxyConnectHeader\":{\"additionalProperties\":{\"items\":{\"description\":\"SecretKeySelector selects a key of a Secret.\",\"properties\":{\"key\":{\"description\":\"The key of the secret to select from.  Must be a valid secret key.\",\"type\":\"string\"},\"name\":{\"default\":\"\",\"description\":\"Name of the referent.\\nThis field is effectively required, but due to backwards compatibility is\\nallowed to be empty. Instances of this type with an empty value here are\\nalmost certainly wrong.\\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\",\"type\":\"string\"},\"optional\":{\"description\":\"Specify whether the Secret or its key must be defined\",\"type\":\"boolean\"}},\"required\":[\"key\"],\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"},\"type\":\"array\"},\"description\":\"ProxyConnectHeader optionally specifies headers to send to\\nproxies during CONNECT requests.\\n\\nIt requires Prometheus >= v2.43.0 or Alertmanager >= 0.25.0.\",\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"},\"proxyFromEnvironment\":{\"description\":\"Whether to use the proxy configuration defined by environment variables (HTTP_PROXY, HTTPS_PROXY, and NO_PROXY).\\n\\nIt requires Prometheus >= v2.43.0 or Alertmanager >= 0.25.0.\",\"type\":\"boolean\"},\"proxyUrl\":{\"description\":\"`proxyURL` defines the HTTP proxy server to use.\",\"pattern\":\"^http(s)?://.+$\",\"type\":\"string\"},\"scopes\":{\"description\":\"`scopes` defines the OAuth2 scopes used for the token request.\",\"items\":{\"type\":\"string\"},\"type\":\"array\"},\"tlsConfig\":{\"description\":\"TLS configuration to use when connecting to the OAuth2 server.\\nIt requires Prometheus >= v2.43.0.\",\"properties\":{\"ca\":{\"description\":\"Certificate authority used when verifying server certificates.\",\"properties\":{\"configMap\":{\"description\":\"ConfigMap containing data to use for the targets.\",\"properties\":{\"key\":{\"description\":\"The key to select.\",\"type\":\"string\"},\"name\":{\"default\":\"\",\"description\":\"Name of the referent.\\nThis field is effectively required, but due to backwards compatibility is\\nallowed to be empty. Instances of this type with an empty value here are\\nalmost certainly wrong.\\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\",\"type\":\"string\"},\"optional\":{\"description\":\"Specify whether the ConfigMap or its key must be defined\",\"type\":\"boolean\"}},\"required\":[\"key\"],\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"},\"secret\":{\"description\":\"Secret containing data to use for the targets.\",\"properties\":{\"key\":{\"description\":\"The key of the secret to select from.  Must be a valid secret key.\",\"type\":\"string\"},\"name\":{\"default\":\"\",\"description\":\"Name of the referent.\\nThis field is effectively required, but due to backwards compatibility is\\nallowed to be empty. Instances of this type with an empty value here are\\nalmost certainly wrong.\\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\",\"type\":\"string\"},\"optional\":{\"description\":\"Specify whether the Secret or its key must be defined\",\"type\":\"boolean\"}},\"required\":[\"key\"],\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"}},\"type\":\"object\"},\"cert\":{\"description\":\"Client certificate to present when doing client-authentication.\",\"properties\":{\"configMap\":{\"description\":\"ConfigMap containing data to use for the targets.\",\"properties\":{\"key\":{\"description\":\"The key to select.\",\"type\":\"string\"},\"name\":{\"default\":\"\",\"description\":\"Name of the referent.\\nThis field is effectively required, but due to backwards compatibility is\\nallowed to be empty. Instances of this type with an empty value here are\\nalmost certainly wrong.\\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\",\"type\":\"string\"},\"optional\":{\"description\":\"Specify whether the ConfigMap or its key must be defined\",\"type\":\"boolean\"}},\"required\":[\"key\"],\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"},\"secret\":{\"description\":\"Secret containing data to use for the targets.\",\"properties\":{\"key\":{\"description\":\"The key of the secret to select from.  Must be a valid secret key.\",\"type\":\"string\"},\"name\":{\"default\":\"\",\"description\":\"Name of the referent.\\nThis field is effectively required, but due to backwards compatibility is\\nallowed to be empty. Instances of this type with an empty value here are\\nalmost certainly wrong.\\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\",\"type\":\"string\"},\"optional\":{\"description\":\"Specify whether the Secret or its key must be defined\",\"type\":\"boolean\"}},\"required\":[\"key\"],\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"}},\"type\":\"object\"},\"insecureSkipVerify\":{\"description\":\"Disable target certificate validation.\",\"type\":\"boolean\"},\"keySecret\":{\"description\":\"Secret containing the client key file for the targets.\",\"properties\":{\"key\":{\"description\":\"The key of the secret to select from.  Must be a valid secret key.\",\"type\":\"string\"},\"name\":{\"default\":\"\",\"description\":\"Name of the referent.\\nThis field is effectively required, but due to backwards compatibility is\\nallowed to be empty. Instances of this type with an empty value here are\\nalmost certainly wrong.\\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\",\"type\":\"string\"},\"optional\":{\"description\":\"Specify whether the Secret or its key must be defined\",\"type\":\"boolean\"}},\"required\":[\"key\"],\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"},\"maxVersion\":{\"description\":\"Maximum acceptable TLS version.\\n\\nIt requires Prometheus >= v2.41.0.\",\"enum\":[\"TLS10\",\"TLS11\",\"TLS12\",\"TLS13\"],\"type\":\"string\"},\"minVersion\":{\"description\":\"Minimum acceptable TLS version.\\n\\nIt requires Prometheus >= v2.35.0.\",\"enum\":[\"TLS10\",\"TLS11\",\"TLS12\",\"TLS13\"],\"type\":\"string\"},\"serverName\":{\"description\":\"Used to verify the hostname for the targets.\",\"type\":\"string\"}},\"type\":\"object\"},\"tokenUrl\":{\"description\":\"`tokenURL` configures the URL to fetch the token from.\",\"minLength\":1,\"type\":\"string\"}},\"required\":[\"clientId\",\"clientSecret\",\"tokenUrl\"],\"type\":\"object\"},\"params\":{\"additionalProperties\":{\"items\":{\"type\":\"string\"},\"type\":\"array\"},\"description\":\"`params` define optional HTTP URL parameters.\",\"type\":\"object\"},\"path\":{\"description\":\"HTTP path from which to scrape for metrics.\\n\\nIf empty, Prometheus uses the default value (e.g. `/metrics`).\",\"type\":\"string\"},\"port\":{\"description\":\"The `Pod` port name which exposes the endpoint.\\n\\nIt takes precedence over the `portNumber` and `targetPort` fields.\",\"type\":\"string\"},\"portNumber\":{\"description\":\"The `Pod` port number which exposes the endpoint.\",\"format\":\"int32\",\"maximum\":65535,\"minimum\":1,\"type\":\"integer\"},\"proxyUrl\":{\"description\":\"`proxyURL` configures the HTTP Proxy URL (e.g.\\n\\\"http://proxyserver:2195\\\") to go through when scraping the target.\",\"type\":\"string\"},\"relabelings\":{\"description\":\"`relabelings` configures the relabeling rules to apply the target's\\nmetadata labels.\\n\\nThe Operator automatically adds relabelings for a few standard Kubernetes fields.\\n\\nThe original scrape job's name is available via the `__tmp_prometheus_job_name` label.\\n\\nMore info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config\",\"items\":{\"description\":\"RelabelConfig allows dynamic rewriting of the label set for targets, alerts,\\nscraped samples and remote write samples.\\n\\nMore info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config\",\"properties\":{\"action\":{\"default\":\"replace\",\"description\":\"Action to perform based on the regex matching.\\n\\n`Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0.\\n`DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0.\\n\\nDefault: \\\"Replace\\\"\",\"enum\":[\"replace\",\"Replace\",\"keep\",\"Keep\",\"drop\",\"Drop\",\"hashmod\",\"HashMod\",\"labelmap\",\"LabelMap\",\"labeldrop\",\"LabelDrop\",\"labelkeep\",\"LabelKeep\",\"lowercase\",\"Lowercase\",\"uppercase\",\"Uppercase\",\"keepequal\",\"KeepEqual\",\"dropequal\",\"DropEqual\"],\"type\":\"string\"},\"modulus\":{\"description\":\"Modulus to take of the hash of the source label values.\\n\\nOnly applicable when the action is `HashMod`.\",\"format\":\"int64\",\"type\":\"integer\"},\"regex\":{\"description\":\"Regular expression against which the extracted value is matched.\",\"type\":\"string\"},\"replacement\":{\"description\":\"Replacement value against which a Replace action is performed if the\\nregular expression matches.\\n\\nRegex capture groups are available.\",\"type\":\"string\"},\"separator\":{\"description\":\"Separator is the string between concatenated SourceLabels.\",\"type\":\"string\"},\"sourceLabels\":{\"description\":\"The source labels select values from existing labels. Their content is\\nconcatenated using the configured Separator and matched against the\\nconfigured regular expression.\",\"items\":{\"description\":\"LabelName is a valid Prometheus label name which may only contain ASCII\\nletters, numbers, as well as underscores.\",\"pattern\":\"^[a-zA-Z_][a-zA-Z0-9_]*$\",\"type\":\"string\"},\"type\":\"array\"},\"targetLabel\":{\"description\":\"Label to which the resulting string is written in a replacement.\\n\\nIt is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`,\\n`KeepEqual` and `DropEqual` actions.\\n\\nRegex capture groups are available.\",\"type\":\"string\"}},\"type\":\"object\"},\"type\":\"array\"},\"scheme\":{\"description\":\"HTTP scheme to use for scraping.\\n\\n`http` and `https` are the expected values unless you rewrite the\\n`__scheme__` label via relabeling.\\n\\nIf empty, Prometheus uses the default value `http`.\",\"enum\":[\"http\",\"https\"],\"type\":\"string\"},\"scrapeTimeout\":{\"description\":\"Timeout after which Prometheus considers the scrape to be failed.\\n\\nIf empty, Prometheus uses the global scrape timeout unless it is less\\nthan the target's scrape interval value in which the latter is used.\",\"pattern\":\"^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$\",\"type\":\"string\"},\"targetPort\":{\"anyOf\":[{\"type\":\"integer\"},{\"type\":\"string\"}],\"description\":\"Name or number of the target port of the `Pod` object behind the Service, the\\nport must be specified with container port property.\\n\\nDeprecated: use 'port' or 'portNumber' instead.\",\"x-kubernetes-int-or-string\":true},\"tlsConfig\":{\"description\":\"TLS configuration to use when scraping the target.\",\"properties\":{\"ca\":{\"description\":\"Certificate authority used when verifying server certificates.\",\"properties\":{\"configMap\":{\"description\":\"ConfigMap containing data to use for the targets.\",\"properties\":{\"key\":{\"description\":\"The key to select.\",\"type\":\"string\"},\"name\":{\"default\":\"\",\"description\":\"Name of the referent.\\nThis field is effectively required, but due to backwards compatibility is\\nallowed to be empty. Instances of this type with an empty value here are\\nalmost certainly wrong.\\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\",\"type\":\"string\"},\"optional\":{\"description\":\"Specify whether the ConfigMap or its key must be defined\",\"type\":\"boolean\"}},\"required\":[\"key\"],\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"},\"secret\":{\"description\":\"Secret containing data to use for the targets.\",\"properties\":{\"key\":{\"description\":\"The key of the secret to select from.  Must be a valid secret key.\",\"type\":\"string\"},\"name\":{\"default\":\"\",\"description\":\"Name of the referent.\\nThis field is effectively required, but due to backwards compatibility is\\nallowed to be empty. Instances of this type with an empty value here are\\nalmost certainly wrong.\\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\",\"type\":\"string\"},\"optional\":{\"description\":\"Specify whether the Secret or its key must be defined\",\"type\":\"boolean\"}},\"required\":[\"key\"],\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"}},\"type\":\"object\"},\"cert\":{\"description\":\"Client certificate to present when doing client-authentication.\",\"properties\":{\"configMap\":{\"description\":\"ConfigMap containing data to use for the targets.\",\"properties\":{\"key\":{\"description\":\"The key to select.\",\"type\":\"string\"},\"name\":{\"default\":\"\",\"description\":\"Name of the referent.\\nThis field is effectively required, but due to backwards compatibility is\\nallowed to be empty. Instances of this type with an empty value here are\\nalmost certainly wrong.\\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\",\"type\":\"string\"},\"optional\":{\"description\":\"Specify whether the ConfigMap or its key must be defined\",\"type\":\"boolean\"}},\"required\":[\"key\"],\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"},\"secret\":{\"description\":\"Secret containing data to use for the targets.\",\"properties\":{\"key\":{\"description\":\"The key of the secret to select from.  Must be a valid secret key.\",\"type\":\"string\"},\"name\":{\"default\":\"\",\"description\":\"Name of the referent.\\nThis field is effectively required, but due to backwards compatibility is\\nallowed to be empty. Instances of this type with an empty value here are\\nalmost certainly wrong.\\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\",\"type\":\"string\"},\"optional\":{\"description\":\"Specify whether the Secret or its key must be defined\",\"type\":\"boolean\"}},\"required\":[\"key\"],\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"}},\"type\":\"object\"},\"insecureSkipVerify\":{\"description\":\"Disable target certificate validation.\",\"type\":\"boolean\"},\"keySecret\":{\"description\":\"Secret containing the client key file for the targets.\",\"properties\":{\"key\":{\"description\":\"The key of the secret to select from.  Must be a valid secret key.\",\"type\":\"string\"},\"name\":{\"default\":\"\",\"description\":\"Name of the referent.\\nThis field is effectively required, but due to backwards compatibility is\\nallowed to be empty. Instances of this type with an empty value here are\\nalmost certainly wrong.\\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\",\"type\":\"string\"},\"optional\":{\"description\":\"Specify whether the Secret or its key must be defined\",\"type\":\"boolean\"}},\"required\":[\"key\"],\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"},\"maxVersion\":{\"description\":\"Maximum acceptable TLS version.\\n\\nIt requires Prometheus >= v2.41.0.\",\"enum\":[\"TLS10\",\"TLS11\",\"TLS12\",\"TLS13\"],\"type\":\"string\"},\"minVersion\":{\"description\":\"Minimum acceptable TLS version.\\n\\nIt requires Prometheus >= v2.35.0.\",\"enum\":[\"TLS10\",\"TLS11\",\"TLS12\",\"TLS13\"],\"type\":\"string\"},\"serverName\":{\"description\":\"Used to verify the hostname for the targets.\",\"type\":\"string\"}},\"type\":\"object\"},\"trackTimestampsStaleness\":{\"description\":\"`trackTimestampsStaleness` defines whether Prometheus tracks staleness of\\nthe metrics that have an explicit timestamp present in scraped data.\\nHas no effect if `honorTimestamps` is false.\\n\\nIt requires Prometheus >= v2.48.0.\",\"type\":\"boolean\"}},\"type\":\"object\"},\"type\":\"array\"},\"podTargetLabels\":{\"description\":\"`podTargetLabels` defines the labels which are transferred from the\\nassociated Kubernetes `Pod` object onto the ingested metrics.\",\"items\":{\"type\":\"string\"},\"type\":\"array\"},\"sampleLimit\":{\"description\":\"`sampleLimit` defines a per-scrape limit on the number of scraped samples\\nthat will be accepted.\",\"format\":\"int64\",\"type\":\"integer\"},\"scrapeClass\":{\"description\":\"The scrape class to apply.\",\"minLength\":1,\"type\":\"string\"},\"scrapeClassicHistograms\":{\"description\":\"Whether to scrape a classic histogram that is also exposed as a native histogram.\\nIt requires Prometheus >= v2.45.0.\",\"type\":\"boolean\"},\"scrapeProtocols\":{\"description\":\"`scrapeProtocols` defines the protocols to negotiate during a scrape. It tells clients the\\nprotocols supported by Prometheus in order of preference (from most to least preferred).\\n\\nIf unset, Prometheus uses its default value.\\n\\nIt requires Prometheus >= v2.49.0.\",\"items\":{\"description\":\"ScrapeProtocol represents a protocol used by Prometheus for scraping metrics.\\nSupported values are:\\n* `OpenMetricsText0.0.1`\\n* `OpenMetricsText1.0.0`\\n* `PrometheusProto`\\n* `PrometheusText0.0.4`\\n* `PrometheusText1.0.0`\",\"enum\":[\"PrometheusProto\",\"OpenMetricsText0.0.1\",\"OpenMetricsText1.0.0\",\"PrometheusText0.0.4\",\"PrometheusText1.0.0\"],\"type\":\"string\"},\"type\":\"array\",\"x-kubernetes-list-type\":\"set\"},\"selector\":{\"description\":\"Label selector to select the Kubernetes `Pod` objects to scrape metrics from.\",\"properties\":{\"matchExpressions\":{\"description\":\"matchExpressions is a list of label selector requirements. The requirements are ANDed.\",\"items\":{\"description\":\"A label selector requirement is a selector that contains values, a key, and an operator that\\nrelates the key and values.\",\"properties\":{\"key\":{\"description\":\"key is the label key that the selector applies to.\",\"type\":\"string\"},\"operator\":{\"description\":\"operator represents a key's relationship to a set of values.\\nValid operators are In, NotIn, Exists and DoesNotExist.\",\"type\":\"string\"},\"values\":{\"description\":\"values is an array of string values. If the operator is In or NotIn,\\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\\nthe values array must be empty. This array is replaced during a strategic\\nmerge patch.\",\"items\":{\"type\":\"string\"},\"type\":\"array\",\"x-kubernetes-list-type\":\"atomic\"}},\"required\":[\"key\",\"operator\"],\"type\":\"object\"},\"type\":\"array\",\"x-kubernetes-list-type\":\"atomic\"},\"matchLabels\":{\"additionalProperties\":{\"type\":\"string\"},\"description\":\"matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\\nmap is equivalent to an element of matchExpressions, whose key field is \\\"key\\\", the\\noperator is \\\"In\\\", and the values array contains only \\\"value\\\". The requirements are ANDed.\",\"type\":\"object\"}},\"type\":\"object\",\"x-kubernetes-map-type\":\"atomic\"},\"selectorMechanism\":{\"description\":\"Mechanism used to select the endpoints to scrape.\\nBy default, the selection process relies on relabel configurations to filter the discovered targets.\\nAlternatively, you can opt in for role selectors, which may offer better efficiency in large clusters.\\nWhich strategy is best for your use case needs to be carefully evaluated.\\n\\nIt requires Prometheus >= v2.17.0.\",\"enum\":[\"RelabelConfig\",\"RoleSelector\"],\"type\":\"string\"},\"targetLimit\":{\"description\":\"`targetLimit` defines a limit on the number of scraped targets that will\\nbe accepted.\",\"format\":\"int64\",\"type\":\"integer\"}},\"required\":[\"selector\"],\"type\":\"object\"}},\"required\":[\"spec\"],\"type\":\"object\"}";
1091}
1092
1093/// Register every keyword form this domain exposes onto the host
1094/// interpreter. Embedders call this once during boot.
1095pub fn register() {
1096    tatara_lisp::register_all_capabilities!(PodMonitorSpec);
1097    tatara_lisp::domain::register_render::<PodMonitorSpec>();
1098    tatara_lisp::domain::register_schema::<PodMonitorSpec>();
1099    tatara_lisp::domain::register_attest::<PodMonitorSpec>();
1100}