1#![allow(clippy::module_name_repetitions)]
9
10use serde::{Deserialize, Serialize};
11use tatara_lisp_derive::TataraDomain;
12
13#[derive(Debug, Clone, Serialize, Deserialize, TataraDomain)]
22#[tatara(keyword = "defpodmonitor")]
23pub struct PodMonitorSpec {
24 #[serde(default)]
29 pub attach_metadata: Option<PodMonitorAttachMetadata>,
30 #[serde(default)]
35 pub body_size_limit: Option<String>,
36 #[serde(default)]
40 pub fallback_scrape_protocol: Option<PodMonitorFallbackScrapeProtocolKind>,
41 #[serde(default)]
52 pub job_label: Option<String>,
53 #[serde(default)]
58 pub keep_dropped_targets: Option<i64>,
59 #[serde(default)]
63 pub label_limit: Option<i64>,
64 #[serde(default)]
68 pub label_name_length_limit: Option<i64>,
69 #[serde(default)]
73 pub label_value_length_limit: Option<i64>,
74 #[serde(default)]
77 pub namespace_selector: Option<PodMonitorNamespaceSelector>,
78 #[serde(default)]
82 pub native_histogram_bucket_limit: Option<i64>,
83 #[serde(default)]
87 pub native_histogram_min_bucket_factor: Option<serde_json::Value>,
88 #[serde(default)]
90 pub pod_metrics_endpoints: Option<Vec<PodMonitorPodMetricsEndpointsItem>>,
91 #[serde(default)]
94 pub pod_target_labels: Option<Vec<String>>,
95 #[serde(default)]
98 pub sample_limit: Option<i64>,
99 #[serde(default)]
101 pub scrape_class: Option<String>,
102 #[serde(default)]
105 pub scrape_classic_histograms: Option<bool>,
106 #[serde(default)]
113 pub scrape_protocols: Option<Vec<PodMonitorScrapeProtocolsItemKind>>,
114 pub selector: PodMonitorSelector,
116 #[serde(default)]
123 pub selector_mechanism: Option<PodMonitorSelectorMechanismKind>,
124 #[serde(default)]
127 pub target_limit: Option<i64>,
128}
129
130#[derive(Debug, Clone, Serialize, Deserialize)]
132pub struct PodMonitorAttachMetadata {
133 #[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 #[serde(default)]
161 pub any: Option<bool>,
162 #[serde(default)]
164 pub match_names: Option<Vec<String>>,
165}
166
167#[derive(Debug, Clone, Serialize, Deserialize)]
168pub struct PodMonitorPodMetricsEndpointsItemAuthorizationCredentials {
169 pub key: String,
171 #[serde(default)]
177 pub name: Option<String>,
178 #[serde(default)]
180 pub optional: Option<bool>,
181}
182
183#[derive(Debug, Clone, Serialize, Deserialize)]
184pub struct PodMonitorPodMetricsEndpointsItemAuthorization {
185 #[serde(default)]
187 pub credentials: Option<PodMonitorPodMetricsEndpointsItemAuthorizationCredentials>,
188 #[serde(default)]
194 pub r#type: Option<String>,
195}
196
197#[derive(Debug, Clone, Serialize, Deserialize)]
198pub struct PodMonitorPodMetricsEndpointsItemBasicAuthPassword {
199 pub key: String,
201 #[serde(default)]
207 pub name: Option<String>,
208 #[serde(default)]
210 pub optional: Option<bool>,
211}
212
213#[derive(Debug, Clone, Serialize, Deserialize)]
214pub struct PodMonitorPodMetricsEndpointsItemBasicAuthUsername {
215 pub key: String,
217 #[serde(default)]
223 pub name: Option<String>,
224 #[serde(default)]
226 pub optional: Option<bool>,
227}
228
229#[derive(Debug, Clone, Serialize, Deserialize)]
230pub struct PodMonitorPodMetricsEndpointsItemBasicAuth {
231 #[serde(default)]
234 pub password: Option<PodMonitorPodMetricsEndpointsItemBasicAuthPassword>,
235 #[serde(default)]
238 pub username: Option<PodMonitorPodMetricsEndpointsItemBasicAuthUsername>,
239}
240
241#[derive(Debug, Clone, Serialize, Deserialize)]
242pub struct PodMonitorPodMetricsEndpointsItemBearerTokenSecret {
243 pub key: String,
245 #[serde(default)]
251 pub name: Option<String>,
252 #[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 #[serde(default)]
314 pub action: Option<PodMonitorPodMetricsEndpointsItemMetricRelabelingsItemActionKind>,
315 #[serde(default)]
319 pub modulus: Option<i64>,
320 #[serde(default)]
322 pub regex: Option<String>,
323 #[serde(default)]
328 pub replacement: Option<String>,
329 #[serde(default)]
331 pub separator: Option<String>,
332 #[serde(default)]
336 pub source_labels: Option<Vec<String>>,
337 #[serde(default)]
344 pub target_label: Option<String>,
345}
346
347#[derive(Debug, Clone, Serialize, Deserialize)]
348pub struct PodMonitorPodMetricsEndpointsItemOauth2ClientIdConfigMap {
349 pub key: String,
351 #[serde(default)]
357 pub name: Option<String>,
358 #[serde(default)]
360 pub optional: Option<bool>,
361}
362
363#[derive(Debug, Clone, Serialize, Deserialize)]
364pub struct PodMonitorPodMetricsEndpointsItemOauth2ClientIdSecret {
365 pub key: String,
367 #[serde(default)]
373 pub name: Option<String>,
374 #[serde(default)]
376 pub optional: Option<bool>,
377}
378
379#[derive(Debug, Clone, Serialize, Deserialize)]
380pub struct PodMonitorPodMetricsEndpointsItemOauth2ClientId {
381 #[serde(default)]
383 pub config_map: Option<PodMonitorPodMetricsEndpointsItemOauth2ClientIdConfigMap>,
384 #[serde(default)]
386 pub secret: Option<PodMonitorPodMetricsEndpointsItemOauth2ClientIdSecret>,
387}
388
389#[derive(Debug, Clone, Serialize, Deserialize)]
390pub struct PodMonitorPodMetricsEndpointsItemOauth2ClientSecret {
391 pub key: String,
393 #[serde(default)]
399 pub name: Option<String>,
400 #[serde(default)]
402 pub optional: Option<bool>,
403}
404
405#[derive(Debug, Clone, Serialize, Deserialize)]
406pub struct PodMonitorPodMetricsEndpointsItemOauth2ProxyConnectHeaderValueItem {
407 pub key: String,
409 #[serde(default)]
415 pub name: Option<String>,
416 #[serde(default)]
418 pub optional: Option<bool>,
419}
420
421#[derive(Debug, Clone, Serialize, Deserialize)]
422pub struct PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCaConfigMap {
423 pub key: String,
425 #[serde(default)]
431 pub name: Option<String>,
432 #[serde(default)]
434 pub optional: Option<bool>,
435}
436
437#[derive(Debug, Clone, Serialize, Deserialize)]
438pub struct PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCaSecret {
439 pub key: String,
441 #[serde(default)]
447 pub name: Option<String>,
448 #[serde(default)]
450 pub optional: Option<bool>,
451}
452
453#[derive(Debug, Clone, Serialize, Deserialize)]
454pub struct PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCa {
455 #[serde(default)]
457 pub config_map: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCaConfigMap>,
458 #[serde(default)]
460 pub secret: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCaSecret>,
461}
462
463#[derive(Debug, Clone, Serialize, Deserialize)]
464pub struct PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCertConfigMap {
465 pub key: String,
467 #[serde(default)]
473 pub name: Option<String>,
474 #[serde(default)]
476 pub optional: Option<bool>,
477}
478
479#[derive(Debug, Clone, Serialize, Deserialize)]
480pub struct PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCertSecret {
481 pub key: String,
483 #[serde(default)]
489 pub name: Option<String>,
490 #[serde(default)]
492 pub optional: Option<bool>,
493}
494
495#[derive(Debug, Clone, Serialize, Deserialize)]
496pub struct PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCert {
497 #[serde(default)]
499 pub config_map: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCertConfigMap>,
500 #[serde(default)]
502 pub secret: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCertSecret>,
503}
504
505#[derive(Debug, Clone, Serialize, Deserialize)]
506pub struct PodMonitorPodMetricsEndpointsItemOauth2TlsConfigKeySecret {
507 pub key: String,
509 #[serde(default)]
515 pub name: Option<String>,
516 #[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 #[serde(default)]
549 pub ca: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCa>,
550 #[serde(default)]
552 pub cert: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfigCert>,
553 #[serde(default)]
555 pub insecure_skip_verify: Option<bool>,
556 #[serde(default)]
558 pub key_secret: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfigKeySecret>,
559 #[serde(default)]
563 pub max_version: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfigMaxVersionKind>,
564 #[serde(default)]
568 pub min_version: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfigMinVersionKind>,
569 #[serde(default)]
571 pub server_name: Option<String>,
572}
573
574#[derive(Debug, Clone, Serialize, Deserialize)]
575pub struct PodMonitorPodMetricsEndpointsItemOauth2 {
576 pub client_id: PodMonitorPodMetricsEndpointsItemOauth2ClientId,
579 pub client_secret: PodMonitorPodMetricsEndpointsItemOauth2ClientSecret,
582 #[serde(default)]
585 pub endpoint_params: Option<std::collections::HashMap<String, String>>,
586 #[serde(default)]
592 pub no_proxy: Option<String>,
593 #[serde(default)]
598 pub proxy_connect_header: Option<std::collections::HashMap<String, Vec<PodMonitorPodMetricsEndpointsItemOauth2ProxyConnectHeaderValueItem>>>,
599 #[serde(default)]
603 pub proxy_from_environment: Option<bool>,
604 #[serde(default)]
606 pub proxy_url: Option<String>,
607 #[serde(default)]
609 pub scopes: Option<Vec<String>>,
610 #[serde(default)]
613 pub tls_config: Option<PodMonitorPodMetricsEndpointsItemOauth2TlsConfig>,
614 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 #[serde(default)]
675 pub action: Option<PodMonitorPodMetricsEndpointsItemRelabelingsItemActionKind>,
676 #[serde(default)]
680 pub modulus: Option<i64>,
681 #[serde(default)]
683 pub regex: Option<String>,
684 #[serde(default)]
689 pub replacement: Option<String>,
690 #[serde(default)]
692 pub separator: Option<String>,
693 #[serde(default)]
697 pub source_labels: Option<Vec<String>>,
698 #[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 pub key: String,
720 #[serde(default)]
726 pub name: Option<String>,
727 #[serde(default)]
729 pub optional: Option<bool>,
730}
731
732#[derive(Debug, Clone, Serialize, Deserialize)]
733pub struct PodMonitorPodMetricsEndpointsItemTlsConfigCaSecret {
734 pub key: String,
736 #[serde(default)]
742 pub name: Option<String>,
743 #[serde(default)]
745 pub optional: Option<bool>,
746}
747
748#[derive(Debug, Clone, Serialize, Deserialize)]
749pub struct PodMonitorPodMetricsEndpointsItemTlsConfigCa {
750 #[serde(default)]
752 pub config_map: Option<PodMonitorPodMetricsEndpointsItemTlsConfigCaConfigMap>,
753 #[serde(default)]
755 pub secret: Option<PodMonitorPodMetricsEndpointsItemTlsConfigCaSecret>,
756}
757
758#[derive(Debug, Clone, Serialize, Deserialize)]
759pub struct PodMonitorPodMetricsEndpointsItemTlsConfigCertConfigMap {
760 pub key: String,
762 #[serde(default)]
768 pub name: Option<String>,
769 #[serde(default)]
771 pub optional: Option<bool>,
772}
773
774#[derive(Debug, Clone, Serialize, Deserialize)]
775pub struct PodMonitorPodMetricsEndpointsItemTlsConfigCertSecret {
776 pub key: String,
778 #[serde(default)]
784 pub name: Option<String>,
785 #[serde(default)]
787 pub optional: Option<bool>,
788}
789
790#[derive(Debug, Clone, Serialize, Deserialize)]
791pub struct PodMonitorPodMetricsEndpointsItemTlsConfigCert {
792 #[serde(default)]
794 pub config_map: Option<PodMonitorPodMetricsEndpointsItemTlsConfigCertConfigMap>,
795 #[serde(default)]
797 pub secret: Option<PodMonitorPodMetricsEndpointsItemTlsConfigCertSecret>,
798}
799
800#[derive(Debug, Clone, Serialize, Deserialize)]
801pub struct PodMonitorPodMetricsEndpointsItemTlsConfigKeySecret {
802 pub key: String,
804 #[serde(default)]
810 pub name: Option<String>,
811 #[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 #[serde(default)]
844 pub ca: Option<PodMonitorPodMetricsEndpointsItemTlsConfigCa>,
845 #[serde(default)]
847 pub cert: Option<PodMonitorPodMetricsEndpointsItemTlsConfigCert>,
848 #[serde(default)]
850 pub insecure_skip_verify: Option<bool>,
851 #[serde(default)]
853 pub key_secret: Option<PodMonitorPodMetricsEndpointsItemTlsConfigKeySecret>,
854 #[serde(default)]
858 pub max_version: Option<PodMonitorPodMetricsEndpointsItemTlsConfigMaxVersionKind>,
859 #[serde(default)]
863 pub min_version: Option<PodMonitorPodMetricsEndpointsItemTlsConfigMinVersionKind>,
864 #[serde(default)]
866 pub server_name: Option<String>,
867}
868
869#[derive(Debug, Clone, Serialize, Deserialize)]
870pub struct PodMonitorPodMetricsEndpointsItem {
871 #[serde(default)]
876 pub authorization: Option<PodMonitorPodMetricsEndpointsItemAuthorization>,
877 #[serde(default)]
882 pub basic_auth: Option<PodMonitorPodMetricsEndpointsItemBasicAuth>,
883 #[serde(default)]
889 pub bearer_token_secret: Option<PodMonitorPodMetricsEndpointsItemBearerTokenSecret>,
890 #[serde(default)]
892 pub enable_http2: Option<bool>,
893 #[serde(default)]
900 pub filter_running: Option<bool>,
901 #[serde(default)]
904 pub follow_redirects: Option<bool>,
905 #[serde(default)]
908 pub honor_labels: Option<bool>,
909 #[serde(default)]
912 pub honor_timestamps: Option<bool>,
913 #[serde(default)]
917 pub interval: Option<String>,
918 #[serde(default)]
921 pub metric_relabelings: Option<Vec<PodMonitorPodMetricsEndpointsItemMetricRelabelingsItem>>,
922 #[serde(default)]
928 pub oauth2: Option<PodMonitorPodMetricsEndpointsItemOauth2>,
929 #[serde(default)]
931 pub params: Option<std::collections::HashMap<String, Vec<String>>>,
932 #[serde(default)]
936 pub path: Option<String>,
937 #[serde(default)]
941 pub port: Option<String>,
942 #[serde(default)]
944 pub port_number: Option<i64>,
945 #[serde(default)]
948 pub proxy_url: Option<String>,
949 #[serde(default)]
958 pub relabelings: Option<Vec<PodMonitorPodMetricsEndpointsItemRelabelingsItem>>,
959 #[serde(default)]
966 pub scheme: Option<PodMonitorPodMetricsEndpointsItemSchemeKind>,
967 #[serde(default)]
972 pub scrape_timeout: Option<String>,
973 #[serde(default)]
978 pub target_port: Option<serde_json::Value>,
979 #[serde(default)]
981 pub tls_config: Option<PodMonitorPodMetricsEndpointsItemTlsConfig>,
982 #[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 pub key: String,
1009 pub operator: String,
1012 #[serde(default)]
1017 pub values: Option<Vec<String>>,
1018}
1019
1020#[derive(Debug, Clone, Serialize, Deserialize)]
1021pub struct PodMonitorSelector {
1022 #[serde(default)]
1024 pub match_expressions: Option<Vec<PodMonitorSelectorMatchExpressionsItem>>,
1025 #[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
1041impl 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
1049impl 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
1077tatara_lisp::impl_default_capabilities!(PodMonitorSpec);
1080
1081impl tatara_lisp::AttestableDomain for PodMonitorSpec {
1084 const ATTESTATION_NAMESPACE: &'static str = "monitoring.coreos.com";
1085}
1086
1087impl 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
1093pub 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}