kubernetes-fluent-client 3.0.3 → 4.0.0-rc-http2-watch

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/.prettierignore +4 -0
  2. package/README.md +24 -0
  3. package/dist/cli.js +21 -1
  4. package/dist/fileSystem.d.ts +11 -0
  5. package/dist/fileSystem.d.ts.map +1 -0
  6. package/dist/fileSystem.js +42 -0
  7. package/dist/fileSystem.test.d.ts +2 -0
  8. package/dist/fileSystem.test.d.ts.map +1 -0
  9. package/dist/fileSystem.test.js +75 -0
  10. package/dist/fluent/watch.d.ts +2 -0
  11. package/dist/fluent/watch.d.ts.map +1 -1
  12. package/dist/fluent/watch.js +147 -27
  13. package/dist/generate.d.ts +71 -11
  14. package/dist/generate.d.ts.map +1 -1
  15. package/dist/generate.js +130 -117
  16. package/dist/generate.test.js +293 -346
  17. package/dist/postProcessing.d.ts +246 -0
  18. package/dist/postProcessing.d.ts.map +1 -0
  19. package/dist/postProcessing.js +497 -0
  20. package/dist/postProcessing.test.d.ts +2 -0
  21. package/dist/postProcessing.test.d.ts.map +1 -0
  22. package/dist/postProcessing.test.js +550 -0
  23. package/e2e/cli.e2e.test.ts +127 -0
  24. package/e2e/crds/policyreports.default.expected/policyreport-v1alpha1.ts +332 -0
  25. package/e2e/crds/policyreports.default.expected/policyreport-v1alpha2.ts +360 -0
  26. package/e2e/crds/policyreports.default.expected/policyreport-v1beta1.ts +360 -0
  27. package/e2e/crds/policyreports.no.post.expected/policyreport-v1alpha1.ts +331 -0
  28. package/e2e/crds/policyreports.no.post.expected/policyreport-v1alpha2.ts +360 -0
  29. package/e2e/crds/policyreports.no.post.expected/policyreport-v1beta1.ts +360 -0
  30. package/e2e/crds/test.yaml/policyreports.test.yaml +1008 -0
  31. package/e2e/crds/test.yaml/uds-podmonitors.test.yaml +1245 -0
  32. package/e2e/crds/uds-podmonitors.default.expected/podmonitor-v1.ts +1333 -0
  33. package/e2e/crds/uds-podmonitors.no.post.expected/podmonitor-v1.ts +1360 -0
  34. package/package.json +6 -5
  35. package/src/cli.ts +25 -1
  36. package/src/fileSystem.test.ts +67 -0
  37. package/src/fileSystem.ts +25 -0
  38. package/src/fluent/watch.ts +174 -35
  39. package/src/generate.test.ts +368 -358
  40. package/src/generate.ts +173 -154
  41. package/src/postProcessing.test.ts +742 -0
  42. package/src/postProcessing.ts +568 -0
@@ -0,0 +1,1333 @@
1
+ // This file is auto-generated by kubernetes-fluent-client, do not edit manually
2
+ import { GenericKind, RegisterKind } from "kubernetes-fluent-client";
3
+ /**
4
+ * The `PodMonitor` custom resource definition (CRD) defines how `Prometheus` and
5
+ * `PrometheusAgent` can scrape metrics from a group of pods.
6
+ * Among other things, it allows to specify:
7
+ * * The pods to scrape via label selectors.
8
+ * * The container ports to scrape.
9
+ * * Authentication credentials to use.
10
+ * * Target and metric relabeling.
11
+ *
12
+ *
13
+ * `Prometheus` and `PrometheusAgent` objects select `PodMonitor` objects using label and
14
+ * namespace selectors.
15
+ */
16
+ export class PodMonitor extends GenericKind {
17
+ /**
18
+ * APIVersion defines the versioned schema of this representation of an object.
19
+ * Servers should convert recognized schemas to the latest internal value, and
20
+ * may reject unrecognized values.
21
+ * More info:
22
+ * https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
23
+ */
24
+ declare apiVersion?: string;
25
+ /**
26
+ * Kind is a string value representing the REST resource this object represents.
27
+ * Servers may infer this from the endpoint the client submits requests to.
28
+ * Cannot be updated.
29
+ * In CamelCase.
30
+ * More info:
31
+ * https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
32
+ */
33
+ declare kind?: string;
34
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
35
+ declare metadata?: { [key: string]: any };
36
+ /**
37
+ * Specification of desired Pod selection for target discovery by Prometheus.
38
+ */
39
+ spec?: Spec;
40
+ }
41
+
42
+ /**
43
+ * Specification of desired Pod selection for target discovery by Prometheus.
44
+ */
45
+ export interface Spec {
46
+ /**
47
+ * `attachMetadata` defines additional metadata which is added to the
48
+ * discovered targets.
49
+ *
50
+ *
51
+ * It requires Prometheus >= v2.35.0.
52
+ */
53
+ attachMetadata?: AttachMetadata;
54
+ /**
55
+ * When defined, bodySizeLimit specifies a job level limit on the size
56
+ * of uncompressed response body that will be accepted by Prometheus.
57
+ *
58
+ *
59
+ * It requires Prometheus >= v2.28.0.
60
+ */
61
+ bodySizeLimit?: string;
62
+ /**
63
+ * The label to use to retrieve the job name from.
64
+ * `jobLabel` selects the label from the associated Kubernetes `Pod`
65
+ * object which will be used as the `job` label for all metrics.
66
+ *
67
+ *
68
+ * For example if `jobLabel` is set to `foo` and the Kubernetes `Pod`
69
+ * object is labeled with `foo: bar`, then Prometheus adds the `job="bar"`
70
+ * label to all ingested metrics.
71
+ *
72
+ *
73
+ * If the value of this field is empty, the `job` label of the metrics
74
+ * defaults to the namespace and name of the PodMonitor object (e.g. `<namespace>/<name>`).
75
+ */
76
+ jobLabel?: string;
77
+ /**
78
+ * Per-scrape limit on the number of targets dropped by relabeling
79
+ * that will be kept in memory. 0 means no limit.
80
+ *
81
+ *
82
+ * It requires Prometheus >= v2.47.0.
83
+ */
84
+ keepDroppedTargets?: number;
85
+ /**
86
+ * Per-scrape limit on number of labels that will be accepted for a sample.
87
+ *
88
+ *
89
+ * It requires Prometheus >= v2.27.0.
90
+ */
91
+ labelLimit?: number;
92
+ /**
93
+ * Per-scrape limit on length of labels name that will be accepted for a sample.
94
+ *
95
+ *
96
+ * It requires Prometheus >= v2.27.0.
97
+ */
98
+ labelNameLengthLimit?: number;
99
+ /**
100
+ * Per-scrape limit on length of labels value that will be accepted for a sample.
101
+ *
102
+ *
103
+ * It requires Prometheus >= v2.27.0.
104
+ */
105
+ labelValueLengthLimit?: number;
106
+ /**
107
+ * `namespaceSelector` defines in which namespace(s) Prometheus should discover the pods.
108
+ * By default, the pods are discovered in the same namespace as the `PodMonitor` object but
109
+ * it is possible to select pods across different/all namespaces.
110
+ */
111
+ namespaceSelector?: NamespaceSelector;
112
+ /**
113
+ * Defines how to scrape metrics from the selected pods.
114
+ */
115
+ podMetricsEndpoints?: PodMetricsEndpoint[];
116
+ /**
117
+ * `podTargetLabels` defines the labels which are transferred from the
118
+ * associated Kubernetes `Pod` object onto the ingested metrics.
119
+ */
120
+ podTargetLabels?: string[];
121
+ /**
122
+ * `sampleLimit` defines a per-scrape limit on the number of scraped samples
123
+ * that will be accepted.
124
+ */
125
+ sampleLimit?: number;
126
+ /**
127
+ * The scrape class to apply.
128
+ */
129
+ scrapeClass?: string;
130
+ /**
131
+ * `scrapeProtocols` defines the protocols to negotiate during a scrape. It tells clients
132
+ * the
133
+ * protocols supported by Prometheus in order of preference (from most to least
134
+ * preferred).
135
+ *
136
+ *
137
+ * If unset, Prometheus uses its default value.
138
+ *
139
+ *
140
+ * It requires Prometheus >= v2.49.0.
141
+ */
142
+ scrapeProtocols?: ScrapeProtocol[];
143
+ /**
144
+ * Label selector to select the Kubernetes `Pod` objects to scrape metrics from.
145
+ */
146
+ selector: Selector;
147
+ /**
148
+ * `targetLimit` defines a limit on the number of scraped targets that will
149
+ * be accepted.
150
+ */
151
+ targetLimit?: number;
152
+ }
153
+
154
+ /**
155
+ * `attachMetadata` defines additional metadata which is added to the
156
+ * discovered targets.
157
+ *
158
+ *
159
+ * It requires Prometheus >= v2.35.0.
160
+ */
161
+ export interface AttachMetadata {
162
+ /**
163
+ * When set to true, Prometheus attaches node metadata to the discovered
164
+ * targets.
165
+ *
166
+ *
167
+ * The Prometheus service account must have the `list` and `watch`
168
+ * permissions on the `Nodes` objects.
169
+ */
170
+ node?: boolean;
171
+ }
172
+
173
+ /**
174
+ * `namespaceSelector` defines in which namespace(s) Prometheus should discover the pods.
175
+ * By default, the pods are discovered in the same namespace as the `PodMonitor` object but
176
+ * it is possible to select pods across different/all namespaces.
177
+ */
178
+ export interface NamespaceSelector {
179
+ /**
180
+ * Boolean describing whether all namespaces are selected in contrast to a
181
+ * list restricting them.
182
+ */
183
+ any?: boolean;
184
+ /**
185
+ * List of namespace names to select from.
186
+ */
187
+ matchNames?: string[];
188
+ }
189
+
190
+ /**
191
+ * PodMetricsEndpoint defines an endpoint serving Prometheus metrics to be scraped by
192
+ * Prometheus.
193
+ */
194
+ export interface PodMetricsEndpoint {
195
+ /**
196
+ * `authorization` configures the Authorization header credentials to use when
197
+ * scraping the target.
198
+ *
199
+ *
200
+ * Cannot be set at the same time as `basicAuth`, or `oauth2`.
201
+ */
202
+ authorization?: Authorization;
203
+ /**
204
+ * `basicAuth` configures the Basic Authentication credentials to use when
205
+ * scraping the target.
206
+ *
207
+ *
208
+ * Cannot be set at the same time as `authorization`, or `oauth2`.
209
+ */
210
+ basicAuth?: BasicAuth;
211
+ /**
212
+ * `bearerTokenSecret` specifies a key of a Secret containing the bearer
213
+ * token for scraping targets. The secret needs to be in the same namespace
214
+ * as the PodMonitor object and readable by the Prometheus Operator.
215
+ *
216
+ *
217
+ * Deprecated: use `authorization` instead.
218
+ */
219
+ bearerTokenSecret?: BearerTokenSecret;
220
+ /**
221
+ * `enableHttp2` can be used to disable HTTP2 when scraping the target.
222
+ */
223
+ enableHttp2?: boolean;
224
+ /**
225
+ * When true, the pods which are not running (e.g. either in Failed or
226
+ * Succeeded state) are dropped during the target discovery.
227
+ *
228
+ *
229
+ * If unset, the filtering is enabled.
230
+ *
231
+ *
232
+ * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase
233
+ */
234
+ filterRunning?: boolean;
235
+ /**
236
+ * `followRedirects` defines whether the scrape requests should follow HTTP
237
+ * 3xx redirects.
238
+ */
239
+ followRedirects?: boolean;
240
+ /**
241
+ * When true, `honorLabels` preserves the metric's labels when they collide
242
+ * with the target's labels.
243
+ */
244
+ honorLabels?: boolean;
245
+ /**
246
+ * `honorTimestamps` controls whether Prometheus preserves the timestamps
247
+ * when exposed by the target.
248
+ */
249
+ honorTimestamps?: boolean;
250
+ /**
251
+ * Interval at which Prometheus scrapes the metrics from the target.
252
+ *
253
+ *
254
+ * If empty, Prometheus uses the global scrape interval.
255
+ */
256
+ interval?: string;
257
+ /**
258
+ * `metricRelabelings` configures the relabeling rules to apply to the
259
+ * samples before ingestion.
260
+ */
261
+ metricRelabelings?: MetricRelabeling[];
262
+ /**
263
+ * `oauth2` configures the OAuth2 settings to use when scraping the target.
264
+ *
265
+ *
266
+ * It requires Prometheus >= 2.27.0.
267
+ *
268
+ *
269
+ * Cannot be set at the same time as `authorization`, or `basicAuth`.
270
+ */
271
+ oauth2?: Oauth2;
272
+ /**
273
+ * `params` define optional HTTP URL parameters.
274
+ */
275
+ params?: { [key: string]: string[] };
276
+ /**
277
+ * HTTP path from which to scrape for metrics.
278
+ *
279
+ *
280
+ * If empty, Prometheus uses the default value (e.g. `/metrics`).
281
+ */
282
+ path?: string;
283
+ /**
284
+ * Name of the Pod port which this endpoint refers to.
285
+ *
286
+ *
287
+ * It takes precedence over `targetPort`.
288
+ */
289
+ port?: string;
290
+ /**
291
+ * `proxyURL` configures the HTTP Proxy URL (e.g.
292
+ * "http://proxyserver:2195") to go through when scraping the target.
293
+ */
294
+ proxyUrl?: string;
295
+ /**
296
+ * `relabelings` configures the relabeling rules to apply the target's
297
+ * metadata labels.
298
+ *
299
+ *
300
+ * The Operator automatically adds relabelings for a few standard Kubernetes fields.
301
+ *
302
+ *
303
+ * The original scrape job's name is available via the `__tmp_prometheus_job_name` label.
304
+ *
305
+ *
306
+ * More info:
307
+ * https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
308
+ */
309
+ relabelings?: Relabeling[];
310
+ /**
311
+ * HTTP scheme to use for scraping.
312
+ *
313
+ *
314
+ * `http` and `https` are the expected values unless you rewrite the
315
+ * `__scheme__` label via relabeling.
316
+ *
317
+ *
318
+ * If empty, Prometheus uses the default value `http`.
319
+ */
320
+ scheme?: Scheme;
321
+ /**
322
+ * Timeout after which Prometheus considers the scrape to be failed.
323
+ *
324
+ *
325
+ * If empty, Prometheus uses the global scrape timeout unless it is less
326
+ * than the target's scrape interval value in which the latter is used.
327
+ */
328
+ scrapeTimeout?: string;
329
+ /**
330
+ * Name or number of the target port of the `Pod` object behind the Service, the
331
+ * port must be specified with container port property.
332
+ *
333
+ *
334
+ * Deprecated: use 'port' instead.
335
+ */
336
+ targetPort?: number | string;
337
+ /**
338
+ * TLS configuration to use when scraping the target.
339
+ */
340
+ tlsConfig?: PodMetricsEndpointTLSConfig;
341
+ /**
342
+ * `trackTimestampsStaleness` defines whether Prometheus tracks staleness of
343
+ * the metrics that have an explicit timestamp present in scraped data.
344
+ * Has no effect if `honorTimestamps` is false.
345
+ *
346
+ *
347
+ * It requires Prometheus >= v2.48.0.
348
+ */
349
+ trackTimestampsStaleness?: boolean;
350
+ }
351
+
352
+ /**
353
+ * `authorization` configures the Authorization header credentials to use when
354
+ * scraping the target.
355
+ *
356
+ *
357
+ * Cannot be set at the same time as `basicAuth`, or `oauth2`.
358
+ */
359
+ export interface Authorization {
360
+ /**
361
+ * Selects a key of a Secret in the namespace that contains the credentials for
362
+ * authentication.
363
+ */
364
+ credentials?: Credentials;
365
+ /**
366
+ * Defines the authentication type. The value is case-insensitive.
367
+ *
368
+ *
369
+ * "Basic" is not a supported value.
370
+ *
371
+ *
372
+ * Default: "Bearer"
373
+ */
374
+ type?: string;
375
+ }
376
+
377
+ /**
378
+ * Selects a key of a Secret in the namespace that contains the credentials for
379
+ * authentication.
380
+ */
381
+ export interface Credentials {
382
+ /**
383
+ * The key of the secret to select from. Must be a valid secret key.
384
+ */
385
+ key: string;
386
+ /**
387
+ * Name of the referent.
388
+ * This field is effectively required, but due to backwards compatibility is
389
+ * allowed to be empty. Instances of this type with an empty value here are
390
+ * almost certainly wrong.
391
+ * TODO: Add other useful fields. apiVersion, kind, uid?
392
+ * More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
393
+ * TODO: Drop `kubebuilder:default` when controller-gen doesn't need it
394
+ * https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
395
+ */
396
+ name?: string;
397
+ /**
398
+ * Specify whether the Secret or its key must be defined
399
+ */
400
+ optional?: boolean;
401
+ }
402
+
403
+ /**
404
+ * `basicAuth` configures the Basic Authentication credentials to use when
405
+ * scraping the target.
406
+ *
407
+ *
408
+ * Cannot be set at the same time as `authorization`, or `oauth2`.
409
+ */
410
+ export interface BasicAuth {
411
+ /**
412
+ * `password` specifies a key of a Secret containing the password for
413
+ * authentication.
414
+ */
415
+ password?: Password;
416
+ /**
417
+ * `username` specifies a key of a Secret containing the username for
418
+ * authentication.
419
+ */
420
+ username?: Username;
421
+ }
422
+
423
+ /**
424
+ * `password` specifies a key of a Secret containing the password for
425
+ * authentication.
426
+ */
427
+ export interface Password {
428
+ /**
429
+ * The key of the secret to select from. Must be a valid secret key.
430
+ */
431
+ key: string;
432
+ /**
433
+ * Name of the referent.
434
+ * This field is effectively required, but due to backwards compatibility is
435
+ * allowed to be empty. Instances of this type with an empty value here are
436
+ * almost certainly wrong.
437
+ * TODO: Add other useful fields. apiVersion, kind, uid?
438
+ * More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
439
+ * TODO: Drop `kubebuilder:default` when controller-gen doesn't need it
440
+ * https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
441
+ */
442
+ name?: string;
443
+ /**
444
+ * Specify whether the Secret or its key must be defined
445
+ */
446
+ optional?: boolean;
447
+ }
448
+
449
+ /**
450
+ * `username` specifies a key of a Secret containing the username for
451
+ * authentication.
452
+ */
453
+ export interface Username {
454
+ /**
455
+ * The key of the secret to select from. Must be a valid secret key.
456
+ */
457
+ key: string;
458
+ /**
459
+ * Name of the referent.
460
+ * This field is effectively required, but due to backwards compatibility is
461
+ * allowed to be empty. Instances of this type with an empty value here are
462
+ * almost certainly wrong.
463
+ * TODO: Add other useful fields. apiVersion, kind, uid?
464
+ * More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
465
+ * TODO: Drop `kubebuilder:default` when controller-gen doesn't need it
466
+ * https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
467
+ */
468
+ name?: string;
469
+ /**
470
+ * Specify whether the Secret or its key must be defined
471
+ */
472
+ optional?: boolean;
473
+ }
474
+
475
+ /**
476
+ * `bearerTokenSecret` specifies a key of a Secret containing the bearer
477
+ * token for scraping targets. The secret needs to be in the same namespace
478
+ * as the PodMonitor object and readable by the Prometheus Operator.
479
+ *
480
+ *
481
+ * Deprecated: use `authorization` instead.
482
+ */
483
+ export interface BearerTokenSecret {
484
+ /**
485
+ * The key of the secret to select from. Must be a valid secret key.
486
+ */
487
+ key: string;
488
+ /**
489
+ * Name of the referent.
490
+ * This field is effectively required, but due to backwards compatibility is
491
+ * allowed to be empty. Instances of this type with an empty value here are
492
+ * almost certainly wrong.
493
+ * TODO: Add other useful fields. apiVersion, kind, uid?
494
+ * More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
495
+ * TODO: Drop `kubebuilder:default` when controller-gen doesn't need it
496
+ * https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
497
+ */
498
+ name?: string;
499
+ /**
500
+ * Specify whether the Secret or its key must be defined
501
+ */
502
+ optional?: boolean;
503
+ }
504
+
505
+ /**
506
+ * RelabelConfig allows dynamic rewriting of the label set for targets, alerts,
507
+ * scraped samples and remote write samples.
508
+ *
509
+ *
510
+ * More info:
511
+ * https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
512
+ */
513
+ export interface MetricRelabeling {
514
+ /**
515
+ * Action to perform based on the regex matching.
516
+ *
517
+ *
518
+ * `Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0.
519
+ * `DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0.
520
+ *
521
+ *
522
+ * Default: "Replace"
523
+ */
524
+ action?: Action;
525
+ /**
526
+ * Modulus to take of the hash of the source label values.
527
+ *
528
+ *
529
+ * Only applicable when the action is `HashMod`.
530
+ */
531
+ modulus?: number;
532
+ /**
533
+ * Regular expression against which the extracted value is matched.
534
+ */
535
+ regex?: string;
536
+ /**
537
+ * Replacement value against which a Replace action is performed if the
538
+ * regular expression matches.
539
+ *
540
+ *
541
+ * Regex capture groups are available.
542
+ */
543
+ replacement?: string;
544
+ /**
545
+ * Separator is the string between concatenated SourceLabels.
546
+ */
547
+ separator?: string;
548
+ /**
549
+ * The source labels select values from existing labels. Their content is
550
+ * concatenated using the configured Separator and matched against the
551
+ * configured regular expression.
552
+ */
553
+ sourceLabels?: string[];
554
+ /**
555
+ * Label to which the resulting string is written in a replacement.
556
+ *
557
+ *
558
+ * It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`,
559
+ * `KeepEqual` and `DropEqual` actions.
560
+ *
561
+ *
562
+ * Regex capture groups are available.
563
+ */
564
+ targetLabel?: string;
565
+ }
566
+
567
+ /**
568
+ * Action to perform based on the regex matching.
569
+ *
570
+ *
571
+ * `Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0.
572
+ * `DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0.
573
+ *
574
+ *
575
+ * Default: "Replace"
576
+ */
577
+ export enum Action {
578
+ ActionDrop = "Drop",
579
+ ActionKeep = "Keep",
580
+ ActionLowercase = "Lowercase",
581
+ ActionReplace = "Replace",
582
+ ActionUppercase = "Uppercase",
583
+ Drop = "drop",
584
+ DropEqual = "DropEqual",
585
+ Dropequal = "dropequal",
586
+ HashMod = "HashMod",
587
+ Hashmod = "hashmod",
588
+ Keep = "keep",
589
+ KeepEqual = "KeepEqual",
590
+ Keepequal = "keepequal",
591
+ LabelDrop = "LabelDrop",
592
+ LabelKeep = "LabelKeep",
593
+ LabelMap = "LabelMap",
594
+ Labeldrop = "labeldrop",
595
+ Labelkeep = "labelkeep",
596
+ Labelmap = "labelmap",
597
+ Lowercase = "lowercase",
598
+ Replace = "replace",
599
+ Uppercase = "uppercase",
600
+ }
601
+
602
+ /**
603
+ * `oauth2` configures the OAuth2 settings to use when scraping the target.
604
+ *
605
+ *
606
+ * It requires Prometheus >= 2.27.0.
607
+ *
608
+ *
609
+ * Cannot be set at the same time as `authorization`, or `basicAuth`.
610
+ */
611
+ export interface Oauth2 {
612
+ /**
613
+ * `clientId` specifies a key of a Secret or ConfigMap containing the
614
+ * OAuth2 client's ID.
615
+ */
616
+ clientId: ClientID;
617
+ /**
618
+ * `clientSecret` specifies a key of a Secret containing the OAuth2
619
+ * client's secret.
620
+ */
621
+ clientSecret: ClientSecret;
622
+ /**
623
+ * `endpointParams` configures the HTTP parameters to append to the token
624
+ * URL.
625
+ */
626
+ endpointParams?: { [key: string]: string };
627
+ /**
628
+ * `noProxy` is a comma-separated string that can contain IPs, CIDR notation, domain names
629
+ * that should be excluded from proxying. IP and domain names can
630
+ * contain port numbers.
631
+ *
632
+ *
633
+ * It requires Prometheus >= v2.43.0.
634
+ */
635
+ noProxy?: string;
636
+ /**
637
+ * ProxyConnectHeader optionally specifies headers to send to
638
+ * proxies during CONNECT requests.
639
+ *
640
+ *
641
+ * It requires Prometheus >= v2.43.0.
642
+ */
643
+ proxyConnectHeader?: { [key: string]: ProxyConnectHeader[] };
644
+ /**
645
+ * Whether to use the proxy configuration defined by environment variables (HTTP_PROXY,
646
+ * HTTPS_PROXY, and NO_PROXY).
647
+ * If unset, Prometheus uses its default value.
648
+ *
649
+ *
650
+ * It requires Prometheus >= v2.43.0.
651
+ */
652
+ proxyFromEnvironment?: boolean;
653
+ /**
654
+ * `proxyURL` defines the HTTP proxy server to use.
655
+ *
656
+ *
657
+ * It requires Prometheus >= v2.43.0.
658
+ */
659
+ proxyUrl?: string;
660
+ /**
661
+ * `scopes` defines the OAuth2 scopes used for the token request.
662
+ */
663
+ scopes?: string[];
664
+ /**
665
+ * TLS configuration to use when connecting to the OAuth2 server.
666
+ * It requires Prometheus >= v2.43.0.
667
+ */
668
+ tlsConfig?: Oauth2TLSConfig;
669
+ /**
670
+ * `tokenURL` configures the URL to fetch the token from.
671
+ */
672
+ tokenUrl: string;
673
+ }
674
+
675
+ /**
676
+ * `clientId` specifies a key of a Secret or ConfigMap containing the
677
+ * OAuth2 client's ID.
678
+ */
679
+ export interface ClientID {
680
+ /**
681
+ * ConfigMap containing data to use for the targets.
682
+ */
683
+ configMap?: ClientIDConfigMap;
684
+ /**
685
+ * Secret containing data to use for the targets.
686
+ */
687
+ secret?: ClientIDSecret;
688
+ }
689
+
690
+ /**
691
+ * ConfigMap containing data to use for the targets.
692
+ */
693
+ export interface ClientIDConfigMap {
694
+ /**
695
+ * The key to select.
696
+ */
697
+ key: string;
698
+ /**
699
+ * Name of the referent.
700
+ * This field is effectively required, but due to backwards compatibility is
701
+ * allowed to be empty. Instances of this type with an empty value here are
702
+ * almost certainly wrong.
703
+ * TODO: Add other useful fields. apiVersion, kind, uid?
704
+ * More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
705
+ * TODO: Drop `kubebuilder:default` when controller-gen doesn't need it
706
+ * https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
707
+ */
708
+ name?: string;
709
+ /**
710
+ * Specify whether the ConfigMap or its key must be defined
711
+ */
712
+ optional?: boolean;
713
+ }
714
+
715
+ /**
716
+ * Secret containing data to use for the targets.
717
+ */
718
+ export interface ClientIDSecret {
719
+ /**
720
+ * The key of the secret to select from. Must be a valid secret key.
721
+ */
722
+ key: string;
723
+ /**
724
+ * Name of the referent.
725
+ * This field is effectively required, but due to backwards compatibility is
726
+ * allowed to be empty. Instances of this type with an empty value here are
727
+ * almost certainly wrong.
728
+ * TODO: Add other useful fields. apiVersion, kind, uid?
729
+ * More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
730
+ * TODO: Drop `kubebuilder:default` when controller-gen doesn't need it
731
+ * https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
732
+ */
733
+ name?: string;
734
+ /**
735
+ * Specify whether the Secret or its key must be defined
736
+ */
737
+ optional?: boolean;
738
+ }
739
+
740
+ /**
741
+ * `clientSecret` specifies a key of a Secret containing the OAuth2
742
+ * client's secret.
743
+ */
744
+ export interface ClientSecret {
745
+ /**
746
+ * The key of the secret to select from. Must be a valid secret key.
747
+ */
748
+ key: string;
749
+ /**
750
+ * Name of the referent.
751
+ * This field is effectively required, but due to backwards compatibility is
752
+ * allowed to be empty. Instances of this type with an empty value here are
753
+ * almost certainly wrong.
754
+ * TODO: Add other useful fields. apiVersion, kind, uid?
755
+ * More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
756
+ * TODO: Drop `kubebuilder:default` when controller-gen doesn't need it
757
+ * https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
758
+ */
759
+ name?: string;
760
+ /**
761
+ * Specify whether the Secret or its key must be defined
762
+ */
763
+ optional?: boolean;
764
+ }
765
+
766
+ /**
767
+ * SecretKeySelector selects a key of a Secret.
768
+ */
769
+ export interface ProxyConnectHeader {
770
+ /**
771
+ * The key of the secret to select from. Must be a valid secret key.
772
+ */
773
+ key: string;
774
+ /**
775
+ * Name of the referent.
776
+ * This field is effectively required, but due to backwards compatibility is
777
+ * allowed to be empty. Instances of this type with an empty value here are
778
+ * almost certainly wrong.
779
+ * TODO: Add other useful fields. apiVersion, kind, uid?
780
+ * More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
781
+ * TODO: Drop `kubebuilder:default` when controller-gen doesn't need it
782
+ * https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
783
+ */
784
+ name?: string;
785
+ /**
786
+ * Specify whether the Secret or its key must be defined
787
+ */
788
+ optional?: boolean;
789
+ }
790
+
791
+ /**
792
+ * TLS configuration to use when connecting to the OAuth2 server.
793
+ * It requires Prometheus >= v2.43.0.
794
+ */
795
+ export interface Oauth2TLSConfig {
796
+ /**
797
+ * Certificate authority used when verifying server certificates.
798
+ */
799
+ ca?: PurpleCA;
800
+ /**
801
+ * Client certificate to present when doing client-authentication.
802
+ */
803
+ cert?: PurpleCERT;
804
+ /**
805
+ * Disable target certificate validation.
806
+ */
807
+ insecureSkipVerify?: boolean;
808
+ /**
809
+ * Secret containing the client key file for the targets.
810
+ */
811
+ keySecret?: PurpleKeySecret;
812
+ /**
813
+ * Maximum acceptable TLS version.
814
+ *
815
+ *
816
+ * It requires Prometheus >= v2.41.0.
817
+ */
818
+ maxVersion?: Version;
819
+ /**
820
+ * Minimum acceptable TLS version.
821
+ *
822
+ *
823
+ * It requires Prometheus >= v2.35.0.
824
+ */
825
+ minVersion?: Version;
826
+ /**
827
+ * Used to verify the hostname for the targets.
828
+ */
829
+ serverName?: string;
830
+ }
831
+
832
+ /**
833
+ * Certificate authority used when verifying server certificates.
834
+ */
835
+ export interface PurpleCA {
836
+ /**
837
+ * ConfigMap containing data to use for the targets.
838
+ */
839
+ configMap?: PurpleConfigMap;
840
+ /**
841
+ * Secret containing data to use for the targets.
842
+ */
843
+ secret?: PurpleSecret;
844
+ }
845
+
846
+ /**
847
+ * ConfigMap containing data to use for the targets.
848
+ */
849
+ export interface PurpleConfigMap {
850
+ /**
851
+ * The key to select.
852
+ */
853
+ key: string;
854
+ /**
855
+ * Name of the referent.
856
+ * This field is effectively required, but due to backwards compatibility is
857
+ * allowed to be empty. Instances of this type with an empty value here are
858
+ * almost certainly wrong.
859
+ * TODO: Add other useful fields. apiVersion, kind, uid?
860
+ * More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
861
+ * TODO: Drop `kubebuilder:default` when controller-gen doesn't need it
862
+ * https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
863
+ */
864
+ name?: string;
865
+ /**
866
+ * Specify whether the ConfigMap or its key must be defined
867
+ */
868
+ optional?: boolean;
869
+ }
870
+
871
+ /**
872
+ * Secret containing data to use for the targets.
873
+ */
874
+ export interface PurpleSecret {
875
+ /**
876
+ * The key of the secret to select from. Must be a valid secret key.
877
+ */
878
+ key: string;
879
+ /**
880
+ * Name of the referent.
881
+ * This field is effectively required, but due to backwards compatibility is
882
+ * allowed to be empty. Instances of this type with an empty value here are
883
+ * almost certainly wrong.
884
+ * TODO: Add other useful fields. apiVersion, kind, uid?
885
+ * More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
886
+ * TODO: Drop `kubebuilder:default` when controller-gen doesn't need it
887
+ * https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
888
+ */
889
+ name?: string;
890
+ /**
891
+ * Specify whether the Secret or its key must be defined
892
+ */
893
+ optional?: boolean;
894
+ }
895
+
896
+ /**
897
+ * Client certificate to present when doing client-authentication.
898
+ */
899
+ export interface PurpleCERT {
900
+ /**
901
+ * ConfigMap containing data to use for the targets.
902
+ */
903
+ configMap?: FluffyConfigMap;
904
+ /**
905
+ * Secret containing data to use for the targets.
906
+ */
907
+ secret?: FluffySecret;
908
+ }
909
+
910
+ /**
911
+ * ConfigMap containing data to use for the targets.
912
+ */
913
+ export interface FluffyConfigMap {
914
+ /**
915
+ * The key to select.
916
+ */
917
+ key: string;
918
+ /**
919
+ * Name of the referent.
920
+ * This field is effectively required, but due to backwards compatibility is
921
+ * allowed to be empty. Instances of this type with an empty value here are
922
+ * almost certainly wrong.
923
+ * TODO: Add other useful fields. apiVersion, kind, uid?
924
+ * More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
925
+ * TODO: Drop `kubebuilder:default` when controller-gen doesn't need it
926
+ * https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
927
+ */
928
+ name?: string;
929
+ /**
930
+ * Specify whether the ConfigMap or its key must be defined
931
+ */
932
+ optional?: boolean;
933
+ }
934
+
935
+ /**
936
+ * Secret containing data to use for the targets.
937
+ */
938
+ export interface FluffySecret {
939
+ /**
940
+ * The key of the secret to select from. Must be a valid secret key.
941
+ */
942
+ key: string;
943
+ /**
944
+ * Name of the referent.
945
+ * This field is effectively required, but due to backwards compatibility is
946
+ * allowed to be empty. Instances of this type with an empty value here are
947
+ * almost certainly wrong.
948
+ * TODO: Add other useful fields. apiVersion, kind, uid?
949
+ * More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
950
+ * TODO: Drop `kubebuilder:default` when controller-gen doesn't need it
951
+ * https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
952
+ */
953
+ name?: string;
954
+ /**
955
+ * Specify whether the Secret or its key must be defined
956
+ */
957
+ optional?: boolean;
958
+ }
959
+
960
+ /**
961
+ * Secret containing the client key file for the targets.
962
+ */
963
+ export interface PurpleKeySecret {
964
+ /**
965
+ * The key of the secret to select from. Must be a valid secret key.
966
+ */
967
+ key: string;
968
+ /**
969
+ * Name of the referent.
970
+ * This field is effectively required, but due to backwards compatibility is
971
+ * allowed to be empty. Instances of this type with an empty value here are
972
+ * almost certainly wrong.
973
+ * TODO: Add other useful fields. apiVersion, kind, uid?
974
+ * More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
975
+ * TODO: Drop `kubebuilder:default` when controller-gen doesn't need it
976
+ * https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
977
+ */
978
+ name?: string;
979
+ /**
980
+ * Specify whether the Secret or its key must be defined
981
+ */
982
+ optional?: boolean;
983
+ }
984
+
985
+ /**
986
+ * Maximum acceptable TLS version.
987
+ *
988
+ *
989
+ * It requires Prometheus >= v2.41.0.
990
+ *
991
+ * Minimum acceptable TLS version.
992
+ *
993
+ *
994
+ * It requires Prometheus >= v2.35.0.
995
+ */
996
+ export enum Version {
997
+ Tls10 = "TLS10",
998
+ Tls11 = "TLS11",
999
+ Tls12 = "TLS12",
1000
+ Tls13 = "TLS13",
1001
+ }
1002
+
1003
+ /**
1004
+ * RelabelConfig allows dynamic rewriting of the label set for targets, alerts,
1005
+ * scraped samples and remote write samples.
1006
+ *
1007
+ *
1008
+ * More info:
1009
+ * https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
1010
+ */
1011
+ export interface Relabeling {
1012
+ /**
1013
+ * Action to perform based on the regex matching.
1014
+ *
1015
+ *
1016
+ * `Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0.
1017
+ * `DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0.
1018
+ *
1019
+ *
1020
+ * Default: "Replace"
1021
+ */
1022
+ action?: Action;
1023
+ /**
1024
+ * Modulus to take of the hash of the source label values.
1025
+ *
1026
+ *
1027
+ * Only applicable when the action is `HashMod`.
1028
+ */
1029
+ modulus?: number;
1030
+ /**
1031
+ * Regular expression against which the extracted value is matched.
1032
+ */
1033
+ regex?: string;
1034
+ /**
1035
+ * Replacement value against which a Replace action is performed if the
1036
+ * regular expression matches.
1037
+ *
1038
+ *
1039
+ * Regex capture groups are available.
1040
+ */
1041
+ replacement?: string;
1042
+ /**
1043
+ * Separator is the string between concatenated SourceLabels.
1044
+ */
1045
+ separator?: string;
1046
+ /**
1047
+ * The source labels select values from existing labels. Their content is
1048
+ * concatenated using the configured Separator and matched against the
1049
+ * configured regular expression.
1050
+ */
1051
+ sourceLabels?: string[];
1052
+ /**
1053
+ * Label to which the resulting string is written in a replacement.
1054
+ *
1055
+ *
1056
+ * It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`,
1057
+ * `KeepEqual` and `DropEqual` actions.
1058
+ *
1059
+ *
1060
+ * Regex capture groups are available.
1061
+ */
1062
+ targetLabel?: string;
1063
+ }
1064
+
1065
+ /**
1066
+ * HTTP scheme to use for scraping.
1067
+ *
1068
+ *
1069
+ * `http` and `https` are the expected values unless you rewrite the
1070
+ * `__scheme__` label via relabeling.
1071
+ *
1072
+ *
1073
+ * If empty, Prometheus uses the default value `http`.
1074
+ */
1075
+ export enum Scheme {
1076
+ HTTP = "http",
1077
+ HTTPS = "https",
1078
+ }
1079
+
1080
+ /**
1081
+ * TLS configuration to use when scraping the target.
1082
+ */
1083
+ export interface PodMetricsEndpointTLSConfig {
1084
+ /**
1085
+ * Certificate authority used when verifying server certificates.
1086
+ */
1087
+ ca?: FluffyCA;
1088
+ /**
1089
+ * Client certificate to present when doing client-authentication.
1090
+ */
1091
+ cert?: FluffyCERT;
1092
+ /**
1093
+ * Disable target certificate validation.
1094
+ */
1095
+ insecureSkipVerify?: boolean;
1096
+ /**
1097
+ * Secret containing the client key file for the targets.
1098
+ */
1099
+ keySecret?: FluffyKeySecret;
1100
+ /**
1101
+ * Maximum acceptable TLS version.
1102
+ *
1103
+ *
1104
+ * It requires Prometheus >= v2.41.0.
1105
+ */
1106
+ maxVersion?: Version;
1107
+ /**
1108
+ * Minimum acceptable TLS version.
1109
+ *
1110
+ *
1111
+ * It requires Prometheus >= v2.35.0.
1112
+ */
1113
+ minVersion?: Version;
1114
+ /**
1115
+ * Used to verify the hostname for the targets.
1116
+ */
1117
+ serverName?: string;
1118
+ }
1119
+
1120
+ /**
1121
+ * Certificate authority used when verifying server certificates.
1122
+ */
1123
+ export interface FluffyCA {
1124
+ /**
1125
+ * ConfigMap containing data to use for the targets.
1126
+ */
1127
+ configMap?: TentacledConfigMap;
1128
+ /**
1129
+ * Secret containing data to use for the targets.
1130
+ */
1131
+ secret?: TentacledSecret;
1132
+ }
1133
+
1134
+ /**
1135
+ * ConfigMap containing data to use for the targets.
1136
+ */
1137
+ export interface TentacledConfigMap {
1138
+ /**
1139
+ * The key to select.
1140
+ */
1141
+ key: string;
1142
+ /**
1143
+ * Name of the referent.
1144
+ * This field is effectively required, but due to backwards compatibility is
1145
+ * allowed to be empty. Instances of this type with an empty value here are
1146
+ * almost certainly wrong.
1147
+ * TODO: Add other useful fields. apiVersion, kind, uid?
1148
+ * More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1149
+ * TODO: Drop `kubebuilder:default` when controller-gen doesn't need it
1150
+ * https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
1151
+ */
1152
+ name?: string;
1153
+ /**
1154
+ * Specify whether the ConfigMap or its key must be defined
1155
+ */
1156
+ optional?: boolean;
1157
+ }
1158
+
1159
+ /**
1160
+ * Secret containing data to use for the targets.
1161
+ */
1162
+ export interface TentacledSecret {
1163
+ /**
1164
+ * The key of the secret to select from. Must be a valid secret key.
1165
+ */
1166
+ key: string;
1167
+ /**
1168
+ * Name of the referent.
1169
+ * This field is effectively required, but due to backwards compatibility is
1170
+ * allowed to be empty. Instances of this type with an empty value here are
1171
+ * almost certainly wrong.
1172
+ * TODO: Add other useful fields. apiVersion, kind, uid?
1173
+ * More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1174
+ * TODO: Drop `kubebuilder:default` when controller-gen doesn't need it
1175
+ * https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
1176
+ */
1177
+ name?: string;
1178
+ /**
1179
+ * Specify whether the Secret or its key must be defined
1180
+ */
1181
+ optional?: boolean;
1182
+ }
1183
+
1184
+ /**
1185
+ * Client certificate to present when doing client-authentication.
1186
+ */
1187
+ export interface FluffyCERT {
1188
+ /**
1189
+ * ConfigMap containing data to use for the targets.
1190
+ */
1191
+ configMap?: StickyConfigMap;
1192
+ /**
1193
+ * Secret containing data to use for the targets.
1194
+ */
1195
+ secret?: StickySecret;
1196
+ }
1197
+
1198
+ /**
1199
+ * ConfigMap containing data to use for the targets.
1200
+ */
1201
+ export interface StickyConfigMap {
1202
+ /**
1203
+ * The key to select.
1204
+ */
1205
+ key: string;
1206
+ /**
1207
+ * Name of the referent.
1208
+ * This field is effectively required, but due to backwards compatibility is
1209
+ * allowed to be empty. Instances of this type with an empty value here are
1210
+ * almost certainly wrong.
1211
+ * TODO: Add other useful fields. apiVersion, kind, uid?
1212
+ * More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1213
+ * TODO: Drop `kubebuilder:default` when controller-gen doesn't need it
1214
+ * https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
1215
+ */
1216
+ name?: string;
1217
+ /**
1218
+ * Specify whether the ConfigMap or its key must be defined
1219
+ */
1220
+ optional?: boolean;
1221
+ }
1222
+
1223
+ /**
1224
+ * Secret containing data to use for the targets.
1225
+ */
1226
+ export interface StickySecret {
1227
+ /**
1228
+ * The key of the secret to select from. Must be a valid secret key.
1229
+ */
1230
+ key: string;
1231
+ /**
1232
+ * Name of the referent.
1233
+ * This field is effectively required, but due to backwards compatibility is
1234
+ * allowed to be empty. Instances of this type with an empty value here are
1235
+ * almost certainly wrong.
1236
+ * TODO: Add other useful fields. apiVersion, kind, uid?
1237
+ * More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1238
+ * TODO: Drop `kubebuilder:default` when controller-gen doesn't need it
1239
+ * https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
1240
+ */
1241
+ name?: string;
1242
+ /**
1243
+ * Specify whether the Secret or its key must be defined
1244
+ */
1245
+ optional?: boolean;
1246
+ }
1247
+
1248
+ /**
1249
+ * Secret containing the client key file for the targets.
1250
+ */
1251
+ export interface FluffyKeySecret {
1252
+ /**
1253
+ * The key of the secret to select from. Must be a valid secret key.
1254
+ */
1255
+ key: string;
1256
+ /**
1257
+ * Name of the referent.
1258
+ * This field is effectively required, but due to backwards compatibility is
1259
+ * allowed to be empty. Instances of this type with an empty value here are
1260
+ * almost certainly wrong.
1261
+ * TODO: Add other useful fields. apiVersion, kind, uid?
1262
+ * More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
1263
+ * TODO: Drop `kubebuilder:default` when controller-gen doesn't need it
1264
+ * https://github.com/kubernetes-sigs/kubebuilder/issues/3896.
1265
+ */
1266
+ name?: string;
1267
+ /**
1268
+ * Specify whether the Secret or its key must be defined
1269
+ */
1270
+ optional?: boolean;
1271
+ }
1272
+
1273
+ /**
1274
+ * ScrapeProtocol represents a protocol used by Prometheus for scraping metrics.
1275
+ * Supported values are:
1276
+ * * `OpenMetricsText0.0.1`
1277
+ * * `OpenMetricsText1.0.0`
1278
+ * * `PrometheusProto`
1279
+ * * `PrometheusText0.0.4`
1280
+ */
1281
+ export enum ScrapeProtocol {
1282
+ OpenMetricsText001 = "OpenMetricsText0.0.1",
1283
+ OpenMetricsText100 = "OpenMetricsText1.0.0",
1284
+ PrometheusProto = "PrometheusProto",
1285
+ PrometheusText004 = "PrometheusText0.0.4",
1286
+ }
1287
+
1288
+ /**
1289
+ * Label selector to select the Kubernetes `Pod` objects to scrape metrics from.
1290
+ */
1291
+ export interface Selector {
1292
+ /**
1293
+ * matchExpressions is a list of label selector requirements. The requirements are ANDed.
1294
+ */
1295
+ matchExpressions?: MatchExpression[];
1296
+ /**
1297
+ * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
1298
+ * map is equivalent to an element of matchExpressions, whose key field is "key", the
1299
+ * operator is "In", and the values array contains only "value". The requirements are ANDed.
1300
+ */
1301
+ matchLabels?: { [key: string]: string };
1302
+ }
1303
+
1304
+ /**
1305
+ * A label selector requirement is a selector that contains values, a key, and an operator
1306
+ * that
1307
+ * relates the key and values.
1308
+ */
1309
+ export interface MatchExpression {
1310
+ /**
1311
+ * key is the label key that the selector applies to.
1312
+ */
1313
+ key: string;
1314
+ /**
1315
+ * operator represents a key's relationship to a set of values.
1316
+ * Valid operators are In, NotIn, Exists and DoesNotExist.
1317
+ */
1318
+ operator: string;
1319
+ /**
1320
+ * values is an array of string values. If the operator is In or NotIn,
1321
+ * the values array must be non-empty. If the operator is Exists or DoesNotExist,
1322
+ * the values array must be empty. This array is replaced during a strategic
1323
+ * merge patch.
1324
+ */
1325
+ values?: string[];
1326
+ }
1327
+
1328
+ RegisterKind(PodMonitor, {
1329
+ group: "monitoring.coreos.com",
1330
+ version: "v1",
1331
+ kind: "PodMonitor",
1332
+ plural: "podmonitors",
1333
+ });