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