...

Text file src/edge-infra.dev/test/fixtures/crds/prometheus-operator/monitoring.coreos.com_podmonitors.yaml

Documentation: edge-infra.dev/test/fixtures/crds/prometheus-operator

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

View as plain text