...

Text file src/edge-infra.dev/test/fixtures/crds/gcp/logging.cnrm.cloud.google.com_logginglogmetrics.yaml

Documentation: edge-infra.dev/test/fixtures/crds/gcp

     1---
     2apiVersion: apiextensions.k8s.io/v1
     3kind: CustomResourceDefinition
     4metadata:
     5  annotations:
     6    controller-gen.kubebuilder.io/version: (unknown)
     7  name: logginglogmetrics.logging.cnrm.cloud.google.com
     8spec:
     9  group: logging.cnrm.cloud.google.com
    10  names:
    11    kind: LoggingLogMetric
    12    listKind: LoggingLogMetricList
    13    plural: logginglogmetrics
    14    singular: logginglogmetric
    15  scope: Namespaced
    16  versions:
    17  - name: v1beta1
    18    schema:
    19      openAPIV3Schema:
    20        description: LoggingLogMetric is the Schema for the logging API
    21        properties:
    22          apiVersion:
    23            description: |-
    24              APIVersion defines the versioned schema of this representation of an object.
    25              Servers should convert recognized schemas to the latest internal value, and
    26              may reject unrecognized values.
    27              More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
    28            type: string
    29          kind:
    30            description: |-
    31              Kind is a string value representing the REST resource this object represents.
    32              Servers may infer this from the endpoint the client submits requests to.
    33              Cannot be updated.
    34              In CamelCase.
    35              More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    36            type: string
    37          metadata:
    38            type: object
    39          spec:
    40            properties:
    41              bucketOptions:
    42                description: Optional. The `bucket_options` are required when the
    43                  logs-based metric is using a DISTRIBUTION value type and it describes
    44                  the bucket boundaries used to create a histogram of the extracted
    45                  values.
    46                properties:
    47                  explicitBuckets:
    48                    description: The explicit buckets.
    49                    properties:
    50                      bounds:
    51                        description: The values must be monotonically increasing.
    52                        items:
    53                          type: number
    54                        type: array
    55                    type: object
    56                  exponentialBuckets:
    57                    description: The exponential buckets.
    58                    properties:
    59                      growthFactor:
    60                        description: Must be greater than 1.
    61                        type: number
    62                      numFiniteBuckets:
    63                        description: Must be greater than 0.
    64                        type: integer
    65                      scale:
    66                        description: Must be greater than 0.
    67                        type: number
    68                    type: object
    69                  linearBuckets:
    70                    description: The linear bucket.
    71                    properties:
    72                      numFiniteBuckets:
    73                        description: Must be greater than 0.
    74                        type: integer
    75                      offset:
    76                        description: Lower bound of the first bucket.
    77                        type: number
    78                      width:
    79                        description: Must be greater than 0.
    80                        type: number
    81                    type: object
    82                type: object
    83              description:
    84                description: Optional. A description of this metric, which is used
    85                  in documentation. The maximum length of the description is 8000
    86                  characters.
    87                type: string
    88              disabled:
    89                description: Optional. If set to True, then this metric is disabled
    90                  and it does not generate any points.
    91                type: boolean
    92              filter:
    93                description: 'Required. An [advanced logs filter](https://cloud.google.com/logging/docs/view/advanced_filters)
    94                  which is used to match log entries. Example: "resource.type=gae_app
    95                  AND severity>=ERROR" The maximum length of the filter is 20000 characters.'
    96                type: string
    97              labelExtractors:
    98                additionalProperties:
    99                  type: string
   100                description: Optional. A map from a label key string to an extractor
   101                  expression which is used to extract data from a log entry field
   102                  and assign as the label value. Each label key specified in the LabelDescriptor
   103                  must have an associated extractor expression in this map. The syntax
   104                  of the extractor expression is the same as for the `value_extractor`
   105                  field. The extracted value is converted to the type defined in the
   106                  label descriptor. If the either the extraction or the type conversion
   107                  fails, the label will have a default value. The default value for
   108                  a string label is an empty string, for an integer label its 0, and
   109                  for a boolean label its `false`. Note that there are upper bounds
   110                  on the maximum number of labels and the number of active time series
   111                  that are allowed in a project.
   112                type: object
   113              metricDescriptor:
   114                description: Optional. The metric descriptor associated with the logs-based
   115                  metric. If unspecified, it uses a default metric descriptor with
   116                  a DELTA metric kind, INT64 value type, with no labels and a unit
   117                  of "1". Such a metric counts the number of log entries matching
   118                  the `filter` expression. The `name`, `type`, and `description` fields
   119                  in the `metric_descriptor` are output only, and is constructed using
   120                  the `name` and `description` field in the LogMetric. To create a
   121                  logs-based metric that records a distribution of log values, a DELTA
   122                  metric kind with a DISTRIBUTION value type must be used along with
   123                  a `value_extractor` expression in the LogMetric. Each label in the
   124                  metric descriptor must have a matching label name as the key and
   125                  an extractor expression as the value in the `label_extractors` map.
   126                  The `metric_kind` and `value_type` fields in the `metric_descriptor`
   127                  cannot be updated once initially configured. New labels can be added
   128                  in the `metric_descriptor`, but existing labels cannot be modified
   129                  except for their description.
   130                properties:
   131                  displayName:
   132                    description: A concise name for the metric, which can be displayed
   133                      in user interfaces. Use sentence case without an ending period,
   134                      for example "Request count". This field is optional but it is
   135                      recommended to be set for any metrics associated with user-visible
   136                      concepts, such as Quota.
   137                    type: string
   138                  labels:
   139                    description: The set of labels that can be used to describe a
   140                      specific instance of this metric type. For example, the `appengine.googleapis.com/http/server/response_latencies`
   141                      metric type has a label for the HTTP response code, `response_code`,
   142                      so you can look at latencies for successful responses or just
   143                      for responses that failed.
   144                    items:
   145                      properties:
   146                        description:
   147                          description: Immutable. A human-readable description for
   148                            the label.
   149                          type: string
   150                        key:
   151                          description: Immutable. The label key.
   152                          type: string
   153                        valueType:
   154                          description: 'Immutable. The type of data that can be assigned
   155                            to the label. Possible values: STRING, BOOL, INT64, DOUBLE,
   156                            DISTRIBUTION, MONEY'
   157                          type: string
   158                      type: object
   159                    type: array
   160                  launchStage:
   161                    description: 'Optional. The launch stage of the metric definition.
   162                      Possible values: UNIMPLEMENTED, PRELAUNCH, EARLY_ACCESS, ALPHA,
   163                      BETA, GA, DEPRECATED'
   164                    type: string
   165                  metadata:
   166                    description: Optional. Metadata which can be used to guide usage
   167                      of the metric.
   168                    properties:
   169                      ingestDelay:
   170                        description: The delay of data points caused by ingestion.
   171                          Data points older than this age are guaranteed to be ingested
   172                          and available to be read, excluding data loss due to errors.
   173                        type: string
   174                      samplePeriod:
   175                        description: The sampling period of metric data points. For
   176                          metrics which are written periodically, consecutive data
   177                          points are stored at this time interval, excluding data
   178                          loss due to errors. Metrics with a higher granularity have
   179                          a smaller sampling period.
   180                        type: string
   181                    type: object
   182                  metricKind:
   183                    description: 'Immutable. Whether the metric records instantaneous
   184                      values, changes to a value, etc. Some combinations of `metric_kind`
   185                      and `value_type` might not be supported. Possible values: GAUGE,
   186                      DELTA, CUMULATIVE'
   187                    type: string
   188                  unit:
   189                    description: 'The units in which the metric value is reported.
   190                      It is only applicable if the `value_type` is `INT64`, `DOUBLE`,
   191                      or `DISTRIBUTION`. The `unit` defines the representation of
   192                      the stored metric values. Different systems might scale the
   193                      values to be more easily displayed (so a value of `0.02kBy`
   194                      _might_ be displayed as `20By`, and a value of `3523kBy` _might_
   195                      be displayed as `3.5MBy`). However, if the `unit` is `kBy`,
   196                      then the value of the metric is always in thousands of bytes,
   197                      no matter how it might be displayed. If you want a custom metric
   198                      to record the exact number of CPU-seconds used by a job, you
   199                      can create an `INT64 CUMULATIVE` metric whose `unit` is `s{CPU}`
   200                      (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005
   201                      CPU-seconds, then the value is written as `12005`. Alternatively,
   202                      if you want a custom metric to record data in a more granular
   203                      way, you can create a `DOUBLE CUMULATIVE` metric whose `unit`
   204                      is `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`),
   205                      or use `Kis{CPU}` and write `11.723` (which is `12005/1024`).
   206                      The supported units are a subset of [The Unified Code for Units
   207                      of Measure](https://unitsofmeasure.org/ucum.html) standard:
   208                      **Basic units (UNIT)** * `bit` bit * `By` byte * `s` second
   209                      * `min` minute * `h` hour * `d` day * `1` dimensionless **Prefixes
   210                      (PREFIX)** * `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9)
   211                      * `T` tera (10^12) * `P` peta (10^15) * `E` exa (10^18) * `Z`
   212                      zetta (10^21) * `Y` yotta (10^24) * `m` milli (10^-3) * `u`
   213                      micro (10^-6) * `n` nano (10^-9) * `p` pico (10^-12) * `f` femto
   214                      (10^-15) * `a` atto (10^-18) * `z` zepto (10^-21) * `y` yocto
   215                      (10^-24) * `Ki` kibi (2^10) * `Mi` mebi (2^20) * `Gi` gibi (2^30)
   216                      * `Ti` tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar
   217                      also includes these connectors: * `/` division or ratio (as
   218                      an infix operator). For examples, `kBy/{email}` or `MiBy/10ms`
   219                      (although you should almost never have `/s` in a metric `unit`;
   220                      rates should always be computed at query time from the underlying
   221                      cumulative or delta value). * `.` multiplication or composition
   222                      (as an infix operator). For examples, `GBy.d` or `k{watt}.h`.
   223                      The grammar for a unit is as follows: Expression = Component:
   224                      { "." Component } { "/" Component } ; Component = ( [ PREFIX
   225                      ] UNIT | "%" ) [ Annotation ] | Annotation | "1" ; Annotation
   226                      = "{" NAME "}" ; Notes: * `Annotation` is just a comment if
   227                      it follows a `UNIT`. If the annotation is used alone, then the
   228                      unit is equivalent to `1`. For examples, `{request}/s == 1/s`,
   229                      `By{transmitted}/s == By/s`. * `NAME` is a sequence of non-blank
   230                      printable ASCII characters not containing `{` or `}`. * `1`
   231                      represents a unitary [dimensionless unit](https://en.wikipedia.org/wiki/Dimensionless_quantity)
   232                      of 1, such as in `1/s`. It is typically used when none of the
   233                      basic units are appropriate. For example, "new users per day"
   234                      can be represented as `1/d` or `{new-users}/d` (and a metric
   235                      value `5` would mean "5 new users). Alternatively, "thousands
   236                      of page views per day" would be represented as `1000/d` or `k1/d`
   237                      or `k{page_views}/d` (and a metric value of `5.3` would mean
   238                      "5300 page views per day"). * `%` represents dimensionless value
   239                      of 1/100, and annotates values giving a percentage (so the metric
   240                      values are typically in the range of 0..100, and a metric value
   241                      `3` means "3 percent"). * `10^2.%` indicates a metric contains
   242                      a ratio, typically in the range 0..1, that will be multiplied
   243                      by 100 and displayed as a percentage (so a metric value `0.03`
   244                      means "3 percent").'
   245                    type: string
   246                  valueType:
   247                    description: 'Immutable. Whether the measurement is an integer,
   248                      a floating-point number, etc. Some combinations of `metric_kind`
   249                      and `value_type` might not be supported. Possible values: STRING,
   250                      BOOL, INT64, DOUBLE, DISTRIBUTION, MONEY'
   251                    type: string
   252                type: object
   253              projectRef:
   254                description: Immutable. The Project that this resource belongs to.
   255                properties:
   256                  external:
   257                    description: The external name of the referenced resource
   258                    type: string
   259                  kind:
   260                    description: Kind of the referent.
   261                    type: string
   262                  name:
   263                    description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
   264                    type: string
   265                  namespace:
   266                    description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/'
   267                    type: string
   268                type: object
   269              resourceID:
   270                description: Immutable. Optional. The name of the resource. Used for
   271                  creation and acquisition. When unset, the value of `metadata.name`
   272                  is used as the default.
   273                type: string
   274              valueExtractor:
   275                description: 'Optional. A `value_extractor` is required when using
   276                  a distribution logs-based metric to extract the values to record
   277                  from a log entry. Two functions are supported for value extraction:
   278                  `EXTRACT(field)` or `REGEXP_EXTRACT(field, regex)`. The argument
   279                  are: 1. field: The name of the log entry field from which the value
   280                  is to be extracted. 2. regex: A regular expression using the Google
   281                  RE2 syntax (https://github.com/google/re2/wiki/Syntax) with a single
   282                  capture group to extract data from the specified log entry field.
   283                  The value of the field is converted to a string before applying
   284                  the regex. It is an error to specify a regex that does not include
   285                  exactly one capture group. The result of the extraction must be
   286                  convertible to a double type, as the distribution always records
   287                  double values. If either the extraction or the conversion to double
   288                  fails, then those values are not recorded in the distribution. Example:
   289                  `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(d+).*")`'
   290                type: string
   291            required:
   292            - filter
   293            - projectRef
   294            type: object
   295          status:
   296            properties:
   297              conditions:
   298                description: |-
   299                  Conditions represent the latest available observations of the
   300                  LoggingLogMetric's current state.
   301                items:
   302                  properties:
   303                    lastTransitionTime:
   304                      description: Last time the condition transitioned from one status
   305                        to another.
   306                      type: string
   307                    message:
   308                      description: Human-readable message indicating details about
   309                        last transition.
   310                      type: string
   311                    reason:
   312                      description: |-
   313                        Unique, one-word, CamelCase reason for the condition's last
   314                        transition.
   315                      type: string
   316                    status:
   317                      description: Status is the status of the condition. Can be True,
   318                        False, Unknown.
   319                      type: string
   320                    type:
   321                      description: Type is the type of the condition.
   322                      type: string
   323                  type: object
   324                type: array
   325              createTime:
   326                description: Output only. The creation timestamp of the metric. This
   327                  field may not be present for older metrics.
   328                type: string
   329              metricDescriptor:
   330                properties:
   331                  description:
   332                    description: A detailed description of the metric, which can be
   333                      used in documentation.
   334                    type: string
   335                  monitoredResourceTypes:
   336                    description: Read-only. If present, then a time series, which
   337                      is identified partially by a metric type and a MonitoredResourceDescriptor,
   338                      that is associated with this metric type can only be associated
   339                      with one of the monitored resource types listed here.
   340                    items:
   341                      type: string
   342                    type: array
   343                  name:
   344                    description: The resource name of the metric descriptor.
   345                    type: string
   346                  type:
   347                    description: 'The metric type, including its DNS name prefix.
   348                      The type is not URL-encoded. All user-defined metric types have
   349                      the DNS name `custom.googleapis.com` or `external.googleapis.com`.
   350                      Metric types should use a natural hierarchical grouping. For
   351                      example: "custom.googleapis.com/invoice/paid/amount" "external.googleapis.com/prometheus/up"
   352                      "appengine.googleapis.com/http/server/response_latencies"'
   353                    type: string
   354                type: object
   355              observedGeneration:
   356                description: ObservedGeneration is the generation of the resource
   357                  that was most recently observed by the Config Connector controller.
   358                  If this is equal to metadata.generation, then that means that the
   359                  current reported status reflects the most recent desired state of
   360                  the resource.
   361                type: integer
   362              updateTime:
   363                description: Output only. The last update timestamp of the metric.
   364                  This field may not be present for older metrics.
   365                type: string
   366            type: object
   367        type: object
   368    served: true
   369    storage: true

View as plain text