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