Facebook
From Dipto , 1 Week ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 81
  1. # https://raw.githubusercontent.com/coreos/prometheus-operator/release-0.38/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
  2. apiVersion: apiextensions.k8s.io/v1
  3. kind: CustomResourceDefinition
  4. metadata:
  5.   annotations:
  6.     controller-gen.kubebuilder.io/version: v0.2.4
  7.     helm.sh/hook: crd-install
  8.   creationTimestamp: null
  9.   name: podmonitors.monitoring.coreos.com
  10. spec:
  11.   group: monitoring.coreos.com
  12.   names:
  13.     kind: PodMonitor
  14.     listKind: PodMonitorList
  15.     plural: podmonitors
  16.     singular: podmonitor
  17.   preserveUnknownFields: false
  18.   scope: Namespaced
  19.   validation:
  20.     openAPIV3Schema:
  21.       description: PodMonitor defines monitoring for a set of pods.
  22.       properties:
  23.         apiVersion:
  24.           description: 'APIVersion defines the versioned schema of this representation
  25.             of an object. Servers should convert recognized schemas to the latest
  26.             internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
  27.           type: string
  28.         kind:
  29.           description: 'Kind is a string value representing the REST resource this
  30.             object represents. Servers may infer this from the endpoint the client
  31.             submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
  32.           type: string
  33.         metadata:
  34.           type: object
  35.         spec:
  36.           description: Specification of desired Pod selection for target discovery
  37.             by Prometheus.
  38.           properties:
  39.             jobLabel:
  40.               description: The label to use to retrieve the job name from.
  41.               type: string
  42.             namespaceSelector:
  43.               description: Selector to select which namespaces the Endpoints objects
  44.                 are discovered from.
  45.               properties:
  46.                 any:
  47.                   description: Boolean describing whether all namespaces are selected
  48.                     in contrast to a list restricting them.
  49.                   type: boolean
  50.                 matchNames:
  51.                   description: List of namespace names.
  52.                   items:
  53.                     type: string
  54.                   type: array
  55.               type: object
  56.             podMetricsEndpoints:
  57.               description: A list of endpoints allowed as part of this PodMonitor.
  58.               items:
  59.                 description: PodMetricsEndpoint defines a scrapeable endpoint of a
  60.                   Kubernetes Pod serving Prometheus metrics.
  61.                 properties:
  62.                   honorLabels:
  63.                     description: HonorLabels chooses the metric's labels on collisions
  64.                       with target labels.
  65.                     type: boolean
  66.                   honorTimestamps:
  67.                     description: HonorTimestamps controls whether Prometheus respects
  68.                       the timestamps present in scraped data.
  69.                     type: boolean
  70.                   interval:
  71.                     description: Interval at which metrics should be scraped
  72.                     type: string
  73.                   metricRelabelings:
  74.                     description: MetricRelabelConfigs to apply to samples before ingestion.
  75.                     items:
  76.                       description: 'RelabelConfig allows dynamic rewriting of the
  77.                         label set, being applied to samples before ingestion. It defines
  78.                         `<metric_relabel_configs>`-section of Prometheus configuration.
  79.                         More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
  80.                       properties:
  81.                         action:
  82.                           description: Action to perform based on regex matching.
  83.                             Default is 'replace'
  84.                           type: string
  85.                         modulus:
  86.                           description: Modulus to take of the hash of the source label
  87.                             values.
  88.                           format: int64
  89.                           type: integer
  90.                         regex:
  91.                           description: Regular expression against which the extracted
  92.                             value is matched. Default is '(.*)'
  93.                           type: string
  94.                         replacement:
  95.                           description: Replacement value against which a regex replace
  96.                             is performed if the regular expression matches. Regex
  97.                             capture groups are available. Default is '$1'
  98.                           type: string
  99.                         separator:
  100.                           description: Separator placed between concatenated source
  101.                             label values. default is ';'.
  102.                           type: string
  103.                         sourceLabels:
  104.                           description: The source labels select values from existing
  105.                             labels. Their content is concatenated using the configured
  106.                             separator and matched against the configured regular expression
  107.                             for the replace, keep, and drop actions.
  108.                           items:
  109.                             type: string
  110.                           type: array
  111.                         targetLabel:
  112.                           description: Label to which the resulting value is written
  113.                             in a replace action. It is mandatory for replace actions.
  114.                             Regex capture groups are available.
  115.                           type: string
  116.                       type: object
  117.                     type: array
  118.                   params:
  119.                     additionalProperties:
  120.                       items:
  121.                         type: string
  122.                       type: array
  123.                     description: Optional HTTP URL parameters
  124.                     type: object
  125.                   path:
  126.                     description: HTTP path to scrape for metrics.
  127.                     type: string
  128.                   port:
  129.                     description: Name of the pod port this endpoint refers to. Mutually
  130.                       exclusive with targetPort.
  131.                     type: string
  132.                   proxyUrl:
  133.                     description: ProxyURL eg http://proxyserver:2195 Directs scrapes
  134.                       to proxy through this endpoint.
  135.                     type: string
  136.                   relabelings:
  137.                     description: 'RelabelConfigs to apply to samples before ingestion.
  138.                       More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config'
  139.                     items:
  140.                       description: 'RelabelConfig allows dynamic rewriting of the
  141.                         label set, being applied to samples before ingestion. It defines
  142.                         `<metric_relabel_configs>`-section of Prometheus configuration.
  143.                         More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
  144.                       properties:
  145.                         action:
  146.                           description: Action to perform based on regex matching.
  147.                             Default is 'replace'
  148.                           type: string
  149.                         modulus:
  150.                           description: Modulus to take of the hash of the source label
  151.                             values.
  152.                           format: int64
  153.                           type: integer
  154.                         regex:
  155.                           description: Regular expression against which the extracted
  156.                             value is matched. Default is '(.*)'
  157.                           type: string
  158.                         replacement:
  159.                           description: Replacement value against which a regex replace
  160.                             is performed if the regular expression matches. Regex
  161.                             capture groups are available. Default is '$1'
  162.                           type: string
  163.                         separator:
  164.                           description: Separator placed between concatenated source
  165.                             label values. default is ';'.
  166.                           type: string
  167.                         sourceLabels:
  168.                           description: The source labels select values from existing
  169.                             labels. Their content is concatenated using the configured
  170.                             separator and matched against the configured regular expression
  171.                             for the replace, keep, and drop actions.
  172.                           items:
  173.                             type: string
  174.                           type: array
  175.                         targetLabel:
  176.                           description: Label to which the resulting value is written
  177.                             in a replace action. It is mandatory for replace actions.
  178.                             Regex capture groups are available.
  179.                           type: string
  180.                       type: object
  181.                     type: array
  182.                   scheme:
  183.                     description: HTTP scheme to use for scraping.
  184.                     type: string
  185.                   scrapeTimeout:
  186.                     description: Timeout after which the scrape is ended
  187.                     type: string
  188.                   targetPort:
  189.                     anyOf:
  190.                     - type: integer
  191.                     - type: string
  192.                     description: 'Deprecated: Use ''port'' instead.'
  193.                     x-kubernetes-int-or-string: true
  194.                 type: object
  195.               type: array
  196.             podTargetLabels:
  197.               description: PodTargetLabels transfers labels on the Kubernetes Pod
  198.                 onto the target.
  199.               items:
  200.                 type: string
  201.               type: array
  202.             sampleLimit:
  203.               description: SampleLimit defines per-scrape limit on number of scraped
  204.                 samples that will be accepted.
  205.               format: int64
  206.               type: integer
  207.             selector:
  208.               description: Selector to select Pod objects.
  209.               properties:
  210.                 matchExpressions:
  211.                   description: matchExpressions is a list of label selector requirements.
  212.                     The requirements are ANDed.
  213.                   items:
  214.                     description: A label selector requirement is a selector that contains
  215.                       values, a key, and an operator that relates the key and values.
  216.                     properties:
  217.                       key:
  218.                         description: key is the label key that the selector applies
  219.                           to.
  220.                         type: string
  221.                       operator:
  222.                         description: operator represents a key's relationship to a
  223.                           set of values. Valid operators are In, NotIn, Exists and
  224.                           DoesNotExist.
  225.                         type: string
  226.                       values:
  227.                         description: values is an array of string values. If the operator
  228.                           is In or NotIn, the values array must be non-empty. If the
  229.                           operator is Exists or DoesNotExist, the values array must
  230.                           be empty. This array is replaced during a strategic merge
  231.                           patch.
  232.                         items:
  233.                           type: string
  234.                         type: array
  235.                     required:
  236.                     - key
  237.                     - operator
  238.                     type: object
  239.                   type: array
  240.                 matchLabels:
  241.                   additionalProperties:
  242.                     type: string
  243.                   description: matchLabels is a map of {key,value} pairs. A single
  244.                     {key,value} in the matchLabels map is equivalent to an element
  245.                     of matchExpressions, whose key field is "key", the operator is
  246.                     "In", and the values array contains only "value". The requirements
  247.                     are ANDed.
  248.                   type: object
  249.               type: object
  250.           required:
  251.           - podMetricsEndpoints
  252.           - selector
  253.           type: object
  254.       required:
  255.       - spec
  256.       type: object
  257.   version: v1
  258.   versions:
  259.   - name: v1
  260.     served: true
  261.     storage: true