github.com/octohelm/cuemod@v0.9.4/pkg/cueify/crd/testdata/src/servicemonitors.yaml (about)

     1  apiVersion: apiextensions.k8s.io/v1
     2  kind: CustomResourceDefinition
     3  metadata:
     4    annotations:
     5      controller-gen.kubebuilder.io/version: v0.4.1
     6    creationTimestamp: null
     7    name: servicemonitors.monitoring.coreos.com
     8  spec:
     9    group: monitoring.coreos.com
    10    names:
    11      categories:
    12        - prometheus-operator
    13      kind: ServiceMonitor
    14      listKind: ServiceMonitorList
    15      plural: servicemonitors
    16      singular: servicemonitor
    17    scope: Namespaced
    18    versions:
    19      - name: v1
    20        schema:
    21          openAPIV3Schema:
    22            description: ServiceMonitor defines monitoring for a set of services.
    23            properties:
    24              apiVersion:
    25                description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
    26                type: string
    27              kind:
    28                description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
    29                type: string
    30              metadata:
    31                type: object
    32              spec:
    33                description: Specification of desired Service selection for target discovery by Prometheus.
    34                properties:
    35                  endpoints:
    36                    description: A list of endpoints allowed as part of this ServiceMonitor.
    37                    items:
    38                      description: Endpoint defines a scrapeable endpoint serving Prometheus metrics.
    39                      properties:
    40                        basicAuth:
    41                          description: 'BasicAuth allow an endpoint to authenticate over basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints'
    42                          properties:
    43                            password:
    44                              description: The secret in the service monitor namespace that contains the password for authentication.
    45                              properties:
    46                                key:
    47                                  description: The key of the secret to select from.  Must be a valid secret key.
    48                                  type: string
    49                                name:
    50                                  description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
    51                                  type: string
    52                                optional:
    53                                  description: Specify whether the Secret or its key must be defined
    54                                  type: boolean
    55                              required:
    56                                - key
    57                              type: object
    58                            username:
    59                              description: The secret in the service monitor namespace that contains the username for authentication.
    60                              properties:
    61                                key:
    62                                  description: The key of the secret to select from.  Must be a valid secret key.
    63                                  type: string
    64                                name:
    65                                  description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
    66                                  type: string
    67                                optional:
    68                                  description: Specify whether the Secret or its key must be defined
    69                                  type: boolean
    70                              required:
    71                                - key
    72                              type: object
    73                          type: object
    74                        bearerTokenFile:
    75                          description: File to read bearer token for scraping targets.
    76                          type: string
    77                        bearerTokenSecret:
    78                          description: Secret to mount to read bearer token for scraping targets. The secret needs to be in the same namespace as the service monitor and accessible by the Prometheus Operator.
    79                          properties:
    80                            key:
    81                              description: The key of the secret to select from.  Must be a valid secret key.
    82                              type: string
    83                            name:
    84                              description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
    85                              type: string
    86                            optional:
    87                              description: Specify whether the Secret or its key must be defined
    88                              type: boolean
    89                          required:
    90                            - key
    91                          type: object
    92                        honorLabels:
    93                          description: HonorLabels chooses the metric's labels on collisions with target labels.
    94                          type: boolean
    95                        honorTimestamps:
    96                          description: HonorTimestamps controls whether Prometheus respects the timestamps present in scraped data.
    97                          type: boolean
    98                        interval:
    99                          description: Interval at which metrics should be scraped
   100                          type: string
   101                        metricRelabelings:
   102                          description: MetricRelabelConfigs to apply to samples before ingestion.
   103                          items:
   104                            description: 'RelabelConfig allows dynamic rewriting of the label set, being applied to samples before ingestion. It defines `<metric_relabel_configs>`-section of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
   105                            properties:
   106                              action:
   107                                description: Action to perform based on regex matching. Default is 'replace'
   108                                type: string
   109                              modulus:
   110                                description: Modulus to take of the hash of the source label values.
   111                                format: int64
   112                                type: integer
   113                              regex:
   114                                description: Regular expression against which the extracted value is matched. Default is '(.*)'
   115                                type: string
   116                              replacement:
   117                                description: Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available. Default is '$1'
   118                                type: string
   119                              separator:
   120                                description: Separator placed between concatenated source label values. default is ';'.
   121                                type: string
   122                              sourceLabels:
   123                                description: The source labels select values from existing labels. Their content is concatenated using the configured separator and matched against the configured regular expression for the replace, keep, and drop actions.
   124                                items:
   125                                  type: string
   126                                type: array
   127                              targetLabel:
   128                                description: Label to which the resulting value is written in a replace action. It is mandatory for replace actions. Regex capture groups are available.
   129                                type: string
   130                            type: object
   131                          type: array
   132                        params:
   133                          additionalProperties:
   134                            items:
   135                              type: string
   136                            type: array
   137                          description: Optional HTTP URL parameters
   138                          type: object
   139                        path:
   140                          description: HTTP path to scrape for metrics.
   141                          type: string
   142                        port:
   143                          description: Name of the service port this endpoint refers to. Mutually exclusive with targetPort.
   144                          type: string
   145                        proxyUrl:
   146                          description: ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint.
   147                          type: string
   148                        relabelings:
   149                          description: 'RelabelConfigs to apply to samples before scraping. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config'
   150                          items:
   151                            description: 'RelabelConfig allows dynamic rewriting of the label set, being applied to samples before ingestion. It defines `<metric_relabel_configs>`-section of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs'
   152                            properties:
   153                              action:
   154                                description: Action to perform based on regex matching. Default is 'replace'
   155                                type: string
   156                              modulus:
   157                                description: Modulus to take of the hash of the source label values.
   158                                format: int64
   159                                type: integer
   160                              regex:
   161                                description: Regular expression against which the extracted value is matched. Default is '(.*)'
   162                                type: string
   163                              replacement:
   164                                description: Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available. Default is '$1'
   165                                type: string
   166                              separator:
   167                                description: Separator placed between concatenated source label values. default is ';'.
   168                                type: string
   169                              sourceLabels:
   170                                description: The source labels select values from existing labels. Their content is concatenated using the configured separator and matched against the configured regular expression for the replace, keep, and drop actions.
   171                                items:
   172                                  type: string
   173                                type: array
   174                              targetLabel:
   175                                description: Label to which the resulting value is written in a replace action. It is mandatory for replace actions. Regex capture groups are available.
   176                                type: string
   177                            type: object
   178                          type: array
   179                        scheme:
   180                          description: HTTP scheme to use for scraping.
   181                          type: string
   182                        scrapeTimeout:
   183                          description: Timeout after which the scrape is ended
   184                          type: string
   185                        targetPort:
   186                          anyOf:
   187                            - type: integer
   188                            - type: string
   189                          description: Name or number of the target port of the Pod behind the Service, the port must be specified with container port property. Mutually exclusive with port.
   190                          x-kubernetes-int-or-string: true
   191                        tlsConfig:
   192                          description: TLS configuration to use when scraping the endpoint
   193                          properties:
   194                            ca:
   195                              description: Struct containing the CA cert to use for the targets.
   196                              properties:
   197                                configMap:
   198                                  description: ConfigMap containing data to use for the targets.
   199                                  properties:
   200                                    key:
   201                                      description: The key to select.
   202                                      type: string
   203                                    name:
   204                                      description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
   205                                      type: string
   206                                    optional:
   207                                      description: Specify whether the ConfigMap or its key must be defined
   208                                      type: boolean
   209                                  required:
   210                                    - key
   211                                  type: object
   212                                secret:
   213                                  description: Secret containing data to use for the targets.
   214                                  properties:
   215                                    key:
   216                                      description: The key of the secret to select from.  Must be a valid secret key.
   217                                      type: string
   218                                    name:
   219                                      description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
   220                                      type: string
   221                                    optional:
   222                                      description: Specify whether the Secret or its key must be defined
   223                                      type: boolean
   224                                  required:
   225                                    - key
   226                                  type: object
   227                              type: object
   228                            caFile:
   229                              description: Path to the CA cert in the Prometheus container to use for the targets.
   230                              type: string
   231                            cert:
   232                              description: Struct containing the client cert file for the targets.
   233                              properties:
   234                                configMap:
   235                                  description: ConfigMap containing data to use for the targets.
   236                                  properties:
   237                                    key:
   238                                      description: The key to select.
   239                                      type: string
   240                                    name:
   241                                      description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
   242                                      type: string
   243                                    optional:
   244                                      description: Specify whether the ConfigMap or its key must be defined
   245                                      type: boolean
   246                                  required:
   247                                    - key
   248                                  type: object
   249                                secret:
   250                                  description: Secret containing data to use for the targets.
   251                                  properties:
   252                                    key:
   253                                      description: The key of the secret to select from.  Must be a valid secret key.
   254                                      type: string
   255                                    name:
   256                                      description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
   257                                      type: string
   258                                    optional:
   259                                      description: Specify whether the Secret or its key must be defined
   260                                      type: boolean
   261                                  required:
   262                                    - key
   263                                  type: object
   264                              type: object
   265                            certFile:
   266                              description: Path to the client cert file in the Prometheus container for the targets.
   267                              type: string
   268                            insecureSkipVerify:
   269                              description: Disable target certificate validation.
   270                              type: boolean
   271                            keyFile:
   272                              description: Path to the client key file in the Prometheus container for the targets.
   273                              type: string
   274                            keySecret:
   275                              description: Secret containing the client key file for the targets.
   276                              properties:
   277                                key:
   278                                  description: The key of the secret to select from.  Must be a valid secret key.
   279                                  type: string
   280                                name:
   281                                  description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
   282                                  type: string
   283                                optional:
   284                                  description: Specify whether the Secret or its key must be defined
   285                                  type: boolean
   286                              required:
   287                                - key
   288                              type: object
   289                            serverName:
   290                              description: Used to verify the hostname for the targets.
   291                              type: string
   292                          type: object
   293                      type: object
   294                    type: array
   295                  jobLabel:
   296                    description: The label to use to retrieve the job name from.
   297                    type: string
   298                  namespaceSelector:
   299                    description: Selector to select which namespaces the Endpoints objects are discovered from.
   300                    properties:
   301                      any:
   302                        description: Boolean describing whether all namespaces are selected in contrast to a list restricting them.
   303                        type: boolean
   304                      matchNames:
   305                        description: List of namespace names.
   306                        items:
   307                          type: string
   308                        type: array
   309                    type: object
   310                  podTargetLabels:
   311                    description: PodTargetLabels transfers labels on the Kubernetes Pod onto the target.
   312                    items:
   313                      type: string
   314                    type: array
   315                  sampleLimit:
   316                    description: SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
   317                    format: int64
   318                    type: integer
   319                  selector:
   320                    description: Selector to select Endpoints objects.
   321                    properties:
   322                      matchExpressions:
   323                        description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
   324                        items:
   325                          description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
   326                          properties:
   327                            key:
   328                              description: key is the label key that the selector applies to.
   329                              type: string
   330                            operator:
   331                              description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
   332                              type: string
   333                            values:
   334                              description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
   335                              items:
   336                                type: string
   337                              type: array
   338                          required:
   339                            - key
   340                            - operator
   341                          type: object
   342                        type: array
   343                      matchLabels:
   344                        additionalProperties:
   345                          type: string
   346                        description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
   347                        type: object
   348                    type: object
   349                  targetLabels:
   350                    description: TargetLabels transfers labels on the Kubernetes Service onto the target.
   351                    items:
   352                      type: string
   353                    type: array
   354                  targetLimit:
   355                    description: TargetLimit defines a limit on the number of scraped targets that will be accepted.
   356                    format: int64
   357                    type: integer
   358                required:
   359                  - endpoints
   360                  - selector
   361                type: object
   362            required:
   363              - spec
   364            type: object
   365        served: true
   366        storage: true
   367  status:
   368    acceptedNames:
   369      kind: ""
   370      plural: ""
   371    conditions: []
   372    storedVersions: []