github.com/m3db/m3@v1.5.0/scripts/vagrant/provision/manifests/kube-prometheus/0prometheus-operator-0servicemonitorCustomResourceDefinition.yaml (about)

     1  apiVersion: apiextensions.k8s.io/v1beta1
     2  kind: CustomResourceDefinition
     3  metadata:
     4    creationTimestamp: null
     5    name: servicemonitors.monitoring.coreos.com
     6  spec:
     7    group: monitoring.coreos.com
     8    names:
     9      kind: ServiceMonitor
    10      plural: servicemonitors
    11    scope: Namespaced
    12    validation:
    13      openAPIV3Schema:
    14        properties:
    15          apiVersion:
    16            description: 'APIVersion defines the versioned schema of this representation
    17              of an object. Servers should convert recognized schemas to the latest
    18              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
    19            type: string
    20          kind:
    21            description: 'Kind is a string value representing the REST resource this
    22              object represents. Servers may infer this from the endpoint the client
    23              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
    24            type: string
    25          spec:
    26            description: ServiceMonitorSpec contains specification parameters for a
    27              ServiceMonitor.
    28            properties:
    29              endpoints:
    30                description: A list of endpoints allowed as part of this ServiceMonitor.
    31                items:
    32                  description: Endpoint defines a scrapeable endpoint serving Prometheus
    33                    metrics.
    34                  properties:
    35                    basicAuth:
    36                      description: 'BasicAuth allow an endpoint to authenticate over
    37                        basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints'
    38                      properties:
    39                        password:
    40                          description: SecretKeySelector selects a key of a Secret.
    41                          properties:
    42                            key:
    43                              description: The key of the secret to select from.  Must
    44                                be a valid secret key.
    45                              type: string
    46                            name:
    47                              description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
    48                              type: string
    49                            optional:
    50                              description: Specify whether the Secret or it's key must
    51                                be defined
    52                              type: boolean
    53                          required:
    54                          - key
    55                        username:
    56                          description: SecretKeySelector selects a key of a Secret.
    57                          properties:
    58                            key:
    59                              description: The key of the secret to select from.  Must
    60                                be a valid secret key.
    61                              type: string
    62                            name:
    63                              description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
    64                              type: string
    65                            optional:
    66                              description: Specify whether the Secret or it's key must
    67                                be defined
    68                              type: boolean
    69                          required:
    70                          - key
    71                    bearerTokenFile:
    72                      description: File to read bearer token for scraping targets.
    73                      type: string
    74                    honorLabels:
    75                      description: HonorLabels chooses the metric's labels on collisions
    76                        with target labels.
    77                      type: boolean
    78                    interval:
    79                      description: Interval at which metrics should be scraped
    80                      type: string
    81                    metricRelabelings:
    82                      description: MetricRelabelConfigs to apply to samples before ingestion.
    83                      items:
    84                        description: 'RelabelConfig allows dynamic rewriting of the
    85                          label set, being applied to samples before ingestion. It defines
    86                          `<metric_relabel_configs>`-section of Prometheus configuration.
    87                          More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
    88                        properties:
    89                          action:
    90                            description: Action to perform based on regex matching.
    91                              Default is 'replace'
    92                            type: string
    93                          modulus:
    94                            description: Modulus to take of the hash of the source label
    95                              values.
    96                            format: int64
    97                            type: integer
    98                          regex:
    99                            description: Regular expression against which the extracted
   100                              value is matched. defailt is '(.*)'
   101                            type: string
   102                          replacement:
   103                            description: Replacement value against which a regex replace
   104                              is performed if the regular expression matches. Regex
   105                              capture groups are available. Default is '$1'
   106                            type: string
   107                          separator:
   108                            description: Separator placed between concatenated source
   109                              label values. default is ';'.
   110                            type: string
   111                          sourceLabels:
   112                            description: The source labels select values from existing
   113                              labels. Their content is concatenated using the configured
   114                              separator and matched against the configured regular expression
   115                              for the replace, keep, and drop actions.
   116                            items:
   117                              type: string
   118                            type: array
   119                          targetLabel:
   120                            description: Label to which the resulting value is written
   121                              in a replace action. It is mandatory for replace actions.
   122                              Regex capture groups are available.
   123                            type: string
   124                      type: array
   125                    params:
   126                      description: Optional HTTP URL parameters
   127                      type: object
   128                    path:
   129                      description: HTTP path to scrape for metrics.
   130                      type: string
   131                    port:
   132                      description: Name of the service port this endpoint refers to.
   133                        Mutually exclusive with targetPort.
   134                      type: string
   135                    proxyUrl:
   136                      description: ProxyURL eg http://proxyserver:2195 Directs scrapes
   137                        to proxy through this endpoint.
   138                      type: string
   139                    relabelings:
   140                      description: 'RelabelConfigs to apply to samples before ingestion.
   141                        More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config'
   142                      items:
   143                        description: 'RelabelConfig allows dynamic rewriting of the
   144                          label set, being applied to samples before ingestion. It defines
   145                          `<metric_relabel_configs>`-section of Prometheus configuration.
   146                          More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
   147                        properties:
   148                          action:
   149                            description: Action to perform based on regex matching.
   150                              Default is 'replace'
   151                            type: string
   152                          modulus:
   153                            description: Modulus to take of the hash of the source label
   154                              values.
   155                            format: int64
   156                            type: integer
   157                          regex:
   158                            description: Regular expression against which the extracted
   159                              value is matched. defailt is '(.*)'
   160                            type: string
   161                          replacement:
   162                            description: Replacement value against which a regex replace
   163                              is performed if the regular expression matches. Regex
   164                              capture groups are available. Default is '$1'
   165                            type: string
   166                          separator:
   167                            description: Separator placed between concatenated source
   168                              label values. default is ';'.
   169                            type: string
   170                          sourceLabels:
   171                            description: The source labels select values from existing
   172                              labels. Their content is concatenated using the configured
   173                              separator and matched against the configured regular expression
   174                              for the replace, keep, and drop actions.
   175                            items:
   176                              type: string
   177                            type: array
   178                          targetLabel:
   179                            description: Label to which the resulting value is written
   180                              in a replace action. It is mandatory for replace actions.
   181                              Regex capture groups are available.
   182                            type: string
   183                      type: array
   184                    scheme:
   185                      description: HTTP scheme to use for scraping.
   186                      type: string
   187                    scrapeTimeout:
   188                      description: Timeout after which the scrape is ended
   189                      type: string
   190                    targetPort:
   191                      anyOf:
   192                      - type: string
   193                      - type: integer
   194                    tlsConfig:
   195                      description: TLSConfig specifies TLS configuration parameters.
   196                      properties:
   197                        caFile:
   198                          description: The CA cert to use for the targets.
   199                          type: string
   200                        certFile:
   201                          description: The client cert file for the targets.
   202                          type: string
   203                        insecureSkipVerify:
   204                          description: Disable target certificate validation.
   205                          type: boolean
   206                        keyFile:
   207                          description: The client key file for the targets.
   208                          type: string
   209                        serverName:
   210                          description: Used to verify the hostname for the targets.
   211                          type: string
   212                type: array
   213              jobLabel:
   214                description: The label to use to retrieve the job name from.
   215                type: string
   216              namespaceSelector:
   217                description: NamespaceSelector is a selector for selecting either all
   218                  namespaces or a list of namespaces.
   219                properties:
   220                  any:
   221                    description: Boolean describing whether all namespaces are selected
   222                      in contrast to a list restricting them.
   223                    type: boolean
   224                  matchNames:
   225                    description: List of namespace names.
   226                    items:
   227                      type: string
   228                    type: array
   229              podTargetLabels:
   230                description: PodTargetLabels transfers labels on the Kubernetes Pod
   231                  onto the target.
   232                items:
   233                  type: string
   234                type: array
   235              sampleLimit:
   236                description: SampleLimit defines per-scrape limit on number of scraped
   237                  samples that will be accepted.
   238                format: int64
   239                type: integer
   240              selector:
   241                description: A label selector is a label query over a set of resources.
   242                  The result of matchLabels and matchExpressions are ANDed. An empty
   243                  label selector matches all objects. A null label selector matches
   244                  no objects.
   245                properties:
   246                  matchExpressions:
   247                    description: matchExpressions is a list of label selector requirements.
   248                      The requirements are ANDed.
   249                    items:
   250                      description: A label selector requirement is a selector that contains
   251                        values, a key, and an operator that relates the key and values.
   252                      properties:
   253                        key:
   254                          description: key is the label key that the selector applies
   255                            to.
   256                          type: string
   257                        operator:
   258                          description: operator represents a key's relationship to a
   259                            set of values. Valid operators are In, NotIn, Exists and
   260                            DoesNotExist.
   261                          type: string
   262                        values:
   263                          description: values is an array of string values. If the operator
   264                            is In or NotIn, the values array must be non-empty. If the
   265                            operator is Exists or DoesNotExist, the values array must
   266                            be empty. This array is replaced during a strategic merge
   267                            patch.
   268                          items:
   269                            type: string
   270                          type: array
   271                      required:
   272                      - key
   273                      - operator
   274                    type: array
   275                  matchLabels:
   276                    description: matchLabels is a map of {key,value} pairs. A single
   277                      {key,value} in the matchLabels map is equivalent to an element
   278                      of matchExpressions, whose key field is "key", the operator is
   279                      "In", and the values array contains only "value". The requirements
   280                      are ANDed.
   281                    type: object
   282              targetLabels:
   283                description: TargetLabels transfers labels on the Kubernetes Service
   284                  onto the target.
   285                items:
   286                  type: string
   287                type: array
   288            required:
   289            - endpoints
   290            - selector
   291    version: v1