monitoring.coreos.com_podmonitors.yaml
1 --- 2 apiVersion: apiextensions.k8s.io/v1 3 kind: CustomResourceDefinition 4 metadata: 5 annotations: 6 controller-gen.kubebuilder.io/version: v0.9.2 7 creationTimestamp: null 8 name: podmonitors.monitoring.coreos.com 9 spec: 10 group: monitoring.coreos.com 11 names: 12 categories: 13 - prometheus-operator 14 kind: PodMonitor 15 listKind: PodMonitorList 16 plural: podmonitors 17 shortNames: 18 - pmon 19 singular: podmonitor 20 scope: Namespaced 21 versions: 22 - name: v1 23 schema: 24 openAPIV3Schema: 25 description: PodMonitor defines monitoring for a set of pods. 26 properties: 27 apiVersion: 28 description: 'APIVersion defines the versioned schema of this representation 29 of an object. Servers should convert recognized schemas to the latest 30 internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' 31 type: string 32 kind: 33 description: 'Kind is a string value representing the REST resource this 34 object represents. Servers may infer this from the endpoint the client 35 submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' 36 type: string 37 metadata: 38 type: object 39 spec: 40 description: Specification of desired Pod selection for target discovery 41 by Prometheus. 42 properties: 43 attachMetadata: 44 description: Attaches node metadata to discovered targets. Requires 45 Prometheus v2.35.0 and above. 46 properties: 47 node: 48 description: When set to true, Prometheus must have permissions 49 to get Nodes. 50 type: boolean 51 type: object 52 jobLabel: 53 description: The label to use to retrieve the job name from. 54 type: string 55 labelLimit: 56 description: Per-scrape limit on number of labels that will be accepted 57 for a sample. Only valid in Prometheus versions 2.27.0 and newer. 58 format: int64 59 type: integer 60 labelNameLengthLimit: 61 description: Per-scrape limit on length of labels name that will be 62 accepted for a sample. Only valid in Prometheus versions 2.27.0 63 and newer. 64 format: int64 65 type: integer 66 labelValueLengthLimit: 67 description: Per-scrape limit on length of labels value that will 68 be accepted for a sample. Only valid in Prometheus versions 2.27.0 69 and newer. 70 format: int64 71 type: integer 72 namespaceSelector: 73 description: Selector to select which namespaces the Endpoints objects 74 are discovered from. 75 properties: 76 any: 77 description: Boolean describing whether all namespaces are selected 78 in contrast to a list restricting them. 79 type: boolean 80 matchNames: 81 description: List of namespace names to select from. 82 items: 83 type: string 84 type: array 85 type: object 86 podMetricsEndpoints: 87 description: A list of endpoints allowed as part of this PodMonitor. 88 items: 89 description: PodMetricsEndpoint defines a scrapeable endpoint of 90 a Kubernetes Pod serving Prometheus metrics. 91 properties: 92 authorization: 93 description: Authorization section for this endpoint 94 properties: 95 credentials: 96 description: The secret's key that contains the credentials 97 of the request 98 properties: 99 key: 100 description: The key of the secret to select from. Must 101 be a valid secret key. 102 type: string 103 name: 104 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names 105 TODO: Add other useful fields. apiVersion, kind, uid?' 106 type: string 107 optional: 108 description: Specify whether the Secret or its key must 109 be defined 110 type: boolean 111 required: 112 - key 113 type: object 114 x-kubernetes-map-type: atomic 115 type: 116 description: Set the authentication type. Defaults to Bearer, 117 Basic will cause an error 118 type: string 119 type: object 120 basicAuth: 121 description: 'BasicAuth allow an endpoint to authenticate over 122 basic authentication. More info: https://prometheus.io/docs/operating/configuration/#endpoint' 123 properties: 124 password: 125 description: The secret in the service monitor namespace 126 that contains the password for authentication. 127 properties: 128 key: 129 description: The key of the secret to select from. Must 130 be a valid secret key. 131 type: string 132 name: 133 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names 134 TODO: Add other useful fields. apiVersion, kind, uid?' 135 type: string 136 optional: 137 description: Specify whether the Secret or its key must 138 be defined 139 type: boolean 140 required: 141 - key 142 type: object 143 x-kubernetes-map-type: atomic 144 username: 145 description: The secret in the service monitor namespace 146 that contains the username for authentication. 147 properties: 148 key: 149 description: The key of the secret to select from. Must 150 be a valid secret key. 151 type: string 152 name: 153 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names 154 TODO: Add other useful fields. apiVersion, kind, uid?' 155 type: string 156 optional: 157 description: Specify whether the Secret or its key must 158 be defined 159 type: boolean 160 required: 161 - key 162 type: object 163 x-kubernetes-map-type: atomic 164 type: object 165 bearerTokenSecret: 166 description: Secret to mount to read bearer token for scraping 167 targets. The secret needs to be in the same namespace as the 168 pod monitor and accessible by the Prometheus Operator. 169 properties: 170 key: 171 description: The key of the secret to select from. Must 172 be a valid secret key. 173 type: string 174 name: 175 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names 176 TODO: Add other useful fields. apiVersion, kind, uid?' 177 type: string 178 optional: 179 description: Specify whether the Secret or its key must 180 be defined 181 type: boolean 182 required: 183 - key 184 type: object 185 x-kubernetes-map-type: atomic 186 enableHttp2: 187 description: Whether to enable HTTP2. 188 type: boolean 189 filterRunning: 190 description: 'Drop pods that are not running. (Failed, Succeeded). 191 Enabled by default. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase' 192 type: boolean 193 followRedirects: 194 description: FollowRedirects configures whether scrape requests 195 follow HTTP 3xx redirects. 196 type: boolean 197 honorLabels: 198 description: HonorLabels chooses the metric's labels on collisions 199 with target labels. 200 type: boolean 201 honorTimestamps: 202 description: HonorTimestamps controls whether Prometheus respects 203 the timestamps present in scraped data. 204 type: boolean 205 interval: 206 description: Interval at which metrics should be scraped If 207 not specified Prometheus' global scrape interval is used. 208 pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ 209 type: string 210 metricRelabelings: 211 description: MetricRelabelConfigs to apply to samples before 212 ingestion. 213 items: 214 description: 'RelabelConfig allows dynamic rewriting of the 215 label set, being applied to samples before ingestion. It 216 defines `<metric_relabel_configs>`-section of Prometheus 217 configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs' 218 properties: 219 action: 220 default: replace 221 description: Action to perform based on regex matching. 222 Default is 'replace'. uppercase and lowercase actions 223 require Prometheus >= 2.36. 224 enum: 225 - replace 226 - Replace 227 - keep 228 - Keep 229 - drop 230 - Drop 231 - hashmod 232 - HashMod 233 - labelmap 234 - LabelMap 235 - labeldrop 236 - LabelDrop 237 - labelkeep 238 - LabelKeep 239 - lowercase 240 - Lowercase 241 - uppercase 242 - Uppercase 243 - keepequal 244 - KeepEqual 245 - dropequal 246 - DropEqual 247 type: string 248 modulus: 249 description: Modulus to take of the hash of the source 250 label values. 251 format: int64 252 type: integer 253 regex: 254 description: Regular expression against which the extracted 255 value is matched. Default is '(.*)' 256 type: string 257 replacement: 258 description: Replacement value against which a regex replace 259 is performed if the regular expression matches. Regex 260 capture groups are available. Default is '$1' 261 type: string 262 separator: 263 description: Separator placed between concatenated source 264 label values. default is ';'. 265 type: string 266 sourceLabels: 267 description: The source labels select values from existing 268 labels. Their content is concatenated using the configured 269 separator and matched against the configured regular 270 expression for the replace, keep, and drop actions. 271 items: 272 description: LabelName is a valid Prometheus label name 273 which may only contain ASCII letters, numbers, as 274 well as underscores. 275 pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ 276 type: string 277 type: array 278 targetLabel: 279 description: Label to which the resulting value is written 280 in a replace action. It is mandatory for replace actions. 281 Regex capture groups are available. 282 type: string 283 type: object 284 type: array 285 oauth2: 286 description: OAuth2 for the URL. Only valid in Prometheus versions 287 2.27.0 and newer. 288 properties: 289 clientId: 290 description: The secret or configmap containing the OAuth2 291 client id 292 properties: 293 configMap: 294 description: ConfigMap containing data to use for the 295 targets. 296 properties: 297 key: 298 description: The key to select. 299 type: string 300 name: 301 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names 302 TODO: Add other useful fields. apiVersion, kind, 303 uid?' 304 type: string 305 optional: 306 description: Specify whether the ConfigMap or its 307 key must be defined 308 type: boolean 309 required: 310 - key 311 type: object 312 x-kubernetes-map-type: atomic 313 secret: 314 description: Secret containing data to use for the targets. 315 properties: 316 key: 317 description: The key of the secret to select from. Must 318 be a valid secret key. 319 type: string 320 name: 321 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names 322 TODO: Add other useful fields. apiVersion, kind, 323 uid?' 324 type: string 325 optional: 326 description: Specify whether the Secret or its key 327 must be defined 328 type: boolean 329 required: 330 - key 331 type: object 332 x-kubernetes-map-type: atomic 333 type: object 334 clientSecret: 335 description: The secret containing the OAuth2 client secret 336 properties: 337 key: 338 description: The key of the secret to select from. Must 339 be a valid secret key. 340 type: string 341 name: 342 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names 343 TODO: Add other useful fields. apiVersion, kind, uid?' 344 type: string 345 optional: 346 description: Specify whether the Secret or its key must 347 be defined 348 type: boolean 349 required: 350 - key 351 type: object 352 x-kubernetes-map-type: atomic 353 endpointParams: 354 additionalProperties: 355 type: string 356 description: Parameters to append to the token URL 357 type: object 358 scopes: 359 description: OAuth2 scopes used for the token request 360 items: 361 type: string 362 type: array 363 tokenUrl: 364 description: The URL to fetch the token from 365 minLength: 1 366 type: string 367 required: 368 - clientId 369 - clientSecret 370 - tokenUrl 371 type: object 372 params: 373 additionalProperties: 374 items: 375 type: string 376 type: array 377 description: Optional HTTP URL parameters 378 type: object 379 path: 380 description: HTTP path to scrape for metrics. If empty, Prometheus 381 uses the default value (e.g. `/metrics`). 382 type: string 383 port: 384 description: Name of the pod port this endpoint refers to. Mutually 385 exclusive with targetPort. 386 type: string 387 proxyUrl: 388 description: ProxyURL eg http://proxyserver:2195 Directs scrapes 389 to proxy through this endpoint. 390 type: string 391 relabelings: 392 description: 'RelabelConfigs to apply to samples before scraping. 393 Prometheus Operator automatically adds relabelings for a few 394 standard Kubernetes fields. The original scrape job''s name 395 is available via the `__tmp_prometheus_job_name` label. More 396 info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config' 397 items: 398 description: 'RelabelConfig allows dynamic rewriting of the 399 label set, being applied to samples before ingestion. It 400 defines `<metric_relabel_configs>`-section of Prometheus 401 configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs' 402 properties: 403 action: 404 default: replace 405 description: Action to perform based on regex matching. 406 Default is 'replace'. uppercase and lowercase actions 407 require Prometheus >= 2.36. 408 enum: 409 - replace 410 - Replace 411 - keep 412 - Keep 413 - drop 414 - Drop 415 - hashmod 416 - HashMod 417 - labelmap 418 - LabelMap 419 - labeldrop 420 - LabelDrop 421 - labelkeep 422 - LabelKeep 423 - lowercase 424 - Lowercase 425 - uppercase 426 - Uppercase 427 - keepequal 428 - KeepEqual 429 - dropequal 430 - DropEqual 431 type: string 432 modulus: 433 description: Modulus to take of the hash of the source 434 label values. 435 format: int64 436 type: integer 437 regex: 438 description: Regular expression against which the extracted 439 value is matched. Default is '(.*)' 440 type: string 441 replacement: 442 description: Replacement value against which a regex replace 443 is performed if the regular expression matches. Regex 444 capture groups are available. Default is '$1' 445 type: string 446 separator: 447 description: Separator placed between concatenated source 448 label values. default is ';'. 449 type: string 450 sourceLabels: 451 description: The source labels select values from existing 452 labels. Their content is concatenated using the configured 453 separator and matched against the configured regular 454 expression for the replace, keep, and drop actions. 455 items: 456 description: LabelName is a valid Prometheus label name 457 which may only contain ASCII letters, numbers, as 458 well as underscores. 459 pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$ 460 type: string 461 type: array 462 targetLabel: 463 description: Label to which the resulting value is written 464 in a replace action. It is mandatory for replace actions. 465 Regex capture groups are available. 466 type: string 467 type: object 468 type: array 469 scheme: 470 description: HTTP scheme to use for scraping. `http` and `https` 471 are the expected values unless you rewrite the `__scheme__` 472 label via relabeling. If empty, Prometheus uses the default 473 value `http`. 474 enum: 475 - http 476 - https 477 type: string 478 scrapeTimeout: 479 description: Timeout after which the scrape is ended If not 480 specified, the Prometheus global scrape interval is used. 481 pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ 482 type: string 483 targetPort: 484 anyOf: 485 - type: integer 486 - type: string 487 description: 'Deprecated: Use ''port'' instead.' 488 x-kubernetes-int-or-string: true 489 tlsConfig: 490 description: TLS configuration to use when scraping the endpoint. 491 properties: 492 ca: 493 description: Certificate authority used when verifying server 494 certificates. 495 properties: 496 configMap: 497 description: ConfigMap containing data to use for the 498 targets. 499 properties: 500 key: 501 description: The key to select. 502 type: string 503 name: 504 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names 505 TODO: Add other useful fields. apiVersion, kind, 506 uid?' 507 type: string 508 optional: 509 description: Specify whether the ConfigMap or its 510 key must be defined 511 type: boolean 512 required: 513 - key 514 type: object 515 x-kubernetes-map-type: atomic 516 secret: 517 description: Secret containing data to use for the targets. 518 properties: 519 key: 520 description: The key of the secret to select from. Must 521 be a valid secret key. 522 type: string 523 name: 524 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names 525 TODO: Add other useful fields. apiVersion, kind, 526 uid?' 527 type: string 528 optional: 529 description: Specify whether the Secret or its key 530 must be defined 531 type: boolean 532 required: 533 - key 534 type: object 535 x-kubernetes-map-type: atomic 536 type: object 537 cert: 538 description: Client certificate to present when doing client-authentication. 539 properties: 540 configMap: 541 description: ConfigMap containing data to use for the 542 targets. 543 properties: 544 key: 545 description: The key to select. 546 type: string 547 name: 548 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names 549 TODO: Add other useful fields. apiVersion, kind, 550 uid?' 551 type: string 552 optional: 553 description: Specify whether the ConfigMap or its 554 key must be defined 555 type: boolean 556 required: 557 - key 558 type: object 559 x-kubernetes-map-type: atomic 560 secret: 561 description: Secret containing data to use for the targets. 562 properties: 563 key: 564 description: The key of the secret to select from. Must 565 be a valid secret key. 566 type: string 567 name: 568 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names 569 TODO: Add other useful fields. apiVersion, kind, 570 uid?' 571 type: string 572 optional: 573 description: Specify whether the Secret or its key 574 must be defined 575 type: boolean 576 required: 577 - key 578 type: object 579 x-kubernetes-map-type: atomic 580 type: object 581 insecureSkipVerify: 582 description: Disable target certificate validation. 583 type: boolean 584 keySecret: 585 description: Secret containing the client key file for the 586 targets. 587 properties: 588 key: 589 description: The key of the secret to select from. Must 590 be a valid secret key. 591 type: string 592 name: 593 description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names 594 TODO: Add other useful fields. apiVersion, kind, uid?' 595 type: string 596 optional: 597 description: Specify whether the Secret or its key must 598 be defined 599 type: boolean 600 required: 601 - key 602 type: object 603 x-kubernetes-map-type: atomic 604 serverName: 605 description: Used to verify the hostname for the targets. 606 type: string 607 type: object 608 type: object 609 type: array 610 podTargetLabels: 611 description: PodTargetLabels transfers labels on the Kubernetes Pod 612 onto the target. 613 items: 614 type: string 615 type: array 616 sampleLimit: 617 description: SampleLimit defines per-scrape limit on number of scraped 618 samples that will be accepted. 619 format: int64 620 type: integer 621 selector: 622 description: Selector to select Pod objects. 623 properties: 624 matchExpressions: 625 description: matchExpressions is a list of label selector requirements. 626 The requirements are ANDed. 627 items: 628 description: A label selector requirement is a selector that 629 contains values, a key, and an operator that relates the key 630 and values. 631 properties: 632 key: 633 description: key is the label key that the selector applies 634 to. 635 type: string 636 operator: 637 description: operator represents a key's relationship to 638 a set of values. Valid operators are In, NotIn, Exists 639 and DoesNotExist. 640 type: string 641 values: 642 description: values is an array of string values. If the 643 operator is In or NotIn, the values array must be non-empty. 644 If the operator is Exists or DoesNotExist, the values 645 array must be empty. This array is replaced during a strategic 646 merge patch. 647 items: 648 type: string 649 type: array 650 required: 651 - key 652 - operator 653 type: object 654 type: array 655 matchLabels: 656 additionalProperties: 657 type: string 658 description: matchLabels is a map of {key,value} pairs. A single 659 {key,value} in the matchLabels map is equivalent to an element 660 of matchExpressions, whose key field is "key", the operator 661 is "In", and the values array contains only "value". The requirements 662 are ANDed. 663 type: object 664 type: object 665 x-kubernetes-map-type: atomic 666 targetLimit: 667 description: TargetLimit defines a limit on the number of scraped 668 targets that will be accepted. 669 format: int64 670 type: integer 671 required: 672 - podMetricsEndpoints 673 - selector 674 type: object 675 required: 676 - spec 677 type: object 678 served: true 679 storage: true