# Code generated by skv2. DO NOT EDIT.

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    crd.solo.io/specHash: 7fac6f4fae3b1d34
    crd.solo.io/version: 1.2.0
  labels:
    app: gloo-mesh
    app.kubernetes.io/name: gloo-mesh
  name: accesslogrecords.observability.enterprise.mesh.gloo.solo.io
spec:
  group: observability.enterprise.mesh.gloo.solo.io
  names:
    kind: AccessLogRecord
    listKind: AccessLogRecordList
    plural: accesslogrecords
    shortNames:
    - alr
    - alrs
    singular: accesslogrecord
  scope: Namespaced
  versions:
  - name: v1
    schema:
      openAPIV3Schema:
        properties:
          spec:
            description: |-
              Describes a record of access logs sourced from a set of workloads and optionally
                 filtered based on request criteria.
            properties:
              filters:
                description: |-
                  Configure criteria for determining which access logs will be recorded.
                  The list is disjunctive, a request will be recorded if it matches any filter.
                  Leave empty to emit all access logs.
                items:
                  oneOf:
                  - not:
                      anyOf:
                      - required:
                        - statusCodeMatcher
                      - required:
                        - headerMatcher
                  - required:
                    - statusCodeMatcher
                  - required:
                    - headerMatcher
                  properties:
                    headerMatcher:
                      description: Matches against a request or response header. Omit
                        to match any headers.
                      properties:
                        invertMatch:
                          description: |-
                            If set to true, the result of the match will be inverted. Defaults to false.

                               Examples:

                                   - name=foo, invert_match=true: matches if no header named `foo` is present
                                   - name=foo, value=bar, invert_match=true: matches if no header named `foo` with value `bar` is present
                                   - name=foo, value=``\d{3}``, regex=true, invert_match=true: matches if no header named `foo` with a value consisting of three integers is present.
                          type: boolean
                        name:
                          description: Specify the name of the header in the request.
                          type: string
                        regex:
                          description: Specify whether the header value should be
                            treated as regex.
                          type: boolean
                        value:
                          description: |-
                            Specify the value of the header. If the value is absent a request that
                            has the name header will match, regardless of the header’s value.
                          type: string
                      type: object
                    statusCodeMatcher:
                      description: Matches against a response status code. Omit to
                        match any status code.
                      properties:
                        comparator:
                          description: The comparison type used for matching.
                          enum:
                          - EQ
                          - GE
                          - LE
                          type: string
                        value:
                          description: The status code value to match against.
                          maximum: 4294967295
                          minimum: 0
                          type: integer
                      type: object
                  type: object
                type: array
              includedFilterStateObjects:
                description: Specify filter state objects to include in access logs
                items:
                  type: string
                type: array
              includedRequestHeaders:
                description: Specify request headers to include in access logs.
                items:
                  type: string
                type: array
              includedResponseHeaders:
                description: Specify response headers to include in access logs.
                items:
                  type: string
                type: array
              includedResponseTrailers:
                description: Specify response trailers to include in access logs.
                items:
                  type: string
                type: array
              workloadSelectors:
                description: |-
                  Select the workloads to be configured to emit access logs.
                  Leave empty to apply to all workloads managed by Gloo Mesh.
                items:
                  properties:
                    kubeWorkloadMatcher:
                      description: Match Kubernetes workloads by their labels, namespaces,
                        and/or clusters.
                      properties:
                        clusters:
                          description: |-
                            If specified, match Kubernetes workloads if they exist in one of the specified clusters.
                                       When used in a networking policy, omission matches any cluster.
                                       When used in a Gloo Mesh Role, a wildcard (`"*"`) must be specified to match any cluster.
                          items:
                            type: string
                          type: array
                        labels:
                          additionalProperties:
                            type: string
                          description: |-
                            If specified, all labels must exist on Kubernetes workload.
                                   When used in a networking policy, omission matches any labels.
                                   When used in a Gloo Mesh Role, a wildcard (`"*"`) must be specified to match any label key and/or value.
                          type: object
                        namespaces:
                          description: |-
                            If specified, match Kubernetes workloads if they exist in one of the specified namespaces.
                                       When used in a networking policy, omission matches any namespace.
                                       When used in a Gloo Mesh Role, a wildcard (`"*"`) must be specified to match any namespace.
                          items:
                            type: string
                          type: array
                      type: object
                  type: object
                type: array
            type: object
          status:
            properties:
              errors:
                description: Any errors encountered during processing. Also reported
                  to any Workloads that this object applies to.
                items:
                  type: string
                type: array
              observedGeneration:
                description: |-
                  The most recent generation observed in the the AccessLogRecord metadata.
                  If the `observedGeneration` does not match `metadata.generation`, Gloo Mesh has not processed the most
                  recent version of this resource.
                format: int64
                type: integer
              state:
                description: |-
                  The state of the overall resource, will only show accepted if it has been successfully
                  applied to all target workloads.
                enum:
                - PENDING
                - ACCEPTED
                - INVALID
                - FAILED
                type: string
              workloads:
                description: references to workloads that this AccessLogRecord applies
                  to
                items:
                  properties:
                    name:
                      description: name of the resource being referenced
                      type: string
                    namespace:
                      description: namespace of the resource being referenced
                      type: string
                  type: object
                type: array
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
