
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.5.0
  creationTimestamp: null
  name: clusterlogforwarders.logging.openshift.io
spec:
  group: logging.openshift.io
  names:
    categories:
    - logging
    kind: ClusterLogForwarder
    listKind: ClusterLogForwarderList
    plural: clusterlogforwarders
    shortNames:
    - clf
    singular: clusterlogforwarder
  scope: Namespaced
  versions:
  - name: v1
    schema:
      openAPIV3Schema:
        description: "ClusterLogForwarder is an API to configure forwarding logs. \n You configure forwarding by specifying a list of `pipelines`, which forward from a set of named inputs to a set of named outputs. \n There are built-in input names for common log categories, and you can define custom inputs to do additional filtering. \n There is a built-in output name for the default openshift log store, but you can define your own outputs with a URL and other connection information to forward logs to other stores or processors, inside or outside the cluster. \n For more details see the documentation on the API fields."
        properties:
          apiVersion:
            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'
            type: string
          kind:
            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'
            type: string
          metadata:
            type: object
          spec:
            description: ClusterLogForwarderSpec defines the desired state of ClusterLogForwarder
            properties:
              inputs:
                description: "Inputs are named filters for log messages to be forwarded. \n There are three built-in inputs named `application`, `infrastructure` and `audit`. You don't need to define inputs here if those are sufficient for your needs. See `inputRefs` for more."
                items:
                  description: InputSpec defines a selector of log messages.
                  properties:
                    application:
                      description: Application, if present, enables `application` logs.
                      properties:
                        namespaces:
                          description: Namespaces is a list of namespaces from which to collect application logs. If the list is empty, logs are collected from all namespaces.
                          items:
                            type: string
                          type: array
                        selector:
                          description: Selector selects logs from all pods with matching labels. For testing purpose, MatchLabels is only supported.
                          properties:
                            matchExpressions:
                              description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
                              items:
                                description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
                                properties:
                                  key:
                                    description: key is the label key that the selector applies to.
                                    type: string
                                  operator:
                                    description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
                                    type: string
                                  values:
                                    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.
                                    items:
                                      type: string
                                    type: array
                                required:
                                - key
                                - operator
                                type: object
                              type: array
                            matchLabels:
                              additionalProperties:
                                type: string
                              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.
                              type: object
                          type: object
                      type: object
                    audit:
                      description: Audit, if present, enables `audit` logs.
                      type: object
                    infrastructure:
                      description: Infrastructure, if present, enables `infrastructure` logs.
                      type: object
                    name:
                      description: Name used to refer to the input of a `pipeline`.
                      type: string
                  required:
                  - name
                  type: object
                type: array
              outputDefaults:
                description: OutputDefaults are used to specify default values for OutputSpec
                properties:
                  elasticsearch:
                    description: "Elasticsearch OutputSpec default values \n Values specified here will be used as default values for Elasticsearch Output spec"
                    properties:
                      structuredTypeKey:
                        description: StructuredTypeKey specifies the metadata key to be used as name of elasticsearch index It takes precedence over StructuredTypeName
                        type: string
                      structuredTypeName:
                        description: StructuredTypeName specifies the name of elasticsearch schema
                        type: string
                    type: object
                type: object
              outputs:
                description: "Outputs are named destinations for log messages. \n There is a built-in output named `default` which forwards to the default openshift log store. You can define outputs to forward to other stores or log processors, inside or outside the cluster."
                items:
                  description: Output defines a destination for log messages.
                  properties:
                    cloudwatch:
                      description: "Cloudwatch provides configuration for the output type `cloudwatch` \n Note: the cloudwatch output recognizes the following additional keys in the Secret: \n \t`aws_secret_access_key`: AWS secret access key. \t`aws_access_key_id`:AWS secret access key ID."
                      properties:
                        groupBy:
                          description: GroupBy defines the strategy for grouping logstreams
                          enum:
                          - logType
                          - namespaceName
                          - namespaceUUID
                          type: string
                        groupPrefix:
                          description: GroupPrefix Add this prefix to all group names.  Useful to avoid group name clashes if an AWS account is used for multiple clusters and  used verbatim (e.g. "" means no prefix)  The default prefix is cluster-name/log-type
                          type: string
                        region:
                          type: string
                      type: object
                    elasticsearch:
                      properties:
                        structuredTypeKey:
                          description: StructuredTypeKey specifies the metadata key to be used as name of elasticsearch index It takes precedence over StructuredTypeName
                          type: string
                        structuredTypeName:
                          description: StructuredTypeName specifies the name of elasticsearch schema
                          type: string
                      type: object
                    fluentdForward:
                      description: "FluentdForward does not provide additional fields, but note that the fluentforward output allows this additional keys in the Secret: \n   `shared_key`: (string) Key to enable fluent-forward shared-key authentication."
                      type: object
                    kafka:
                      description: 'Kafka provides optional extra properties for `type: kafka`'
                      properties:
                        brokers:
                          description: Brokers specifies the list of brokers to register in addition to the main output URL on initial connect to enhance reliability.
                          items:
                            type: string
                          type: array
                        topic:
                          description: Topic specifies the target topic to send logs to.
                          type: string
                      type: object
                    loki:
                      description: 'Loki provides optional extra properties for `type: loki`'
                      properties:
                        labelKeys:
                          description: "LabelKeys is a list of meta-data field keys to replace the default Loki labels. \n Loki label names must match the regular expression \"[a-zA-Z_:][a-zA-Z0-9_:]*\". Illegal characters in meta-data keys are replaced with \"_\" to form the label name. For example meta-data key \"kubernetes.labels.foo\" becomes Loki label \"kubernetes_labels_foo\". \n If LabelKeys is not set, the default keys are `[log_type, kubernetes.namespace_name, kubernetes.pod_name, kubernetes_host]` These keys are translated to Loki labels by replacing '.' with '_' as: `log_type`, `kubernetes_namespace_name`, `kubernetes_pod_name`, `kubernetes_host` Note that not all logs will include all of these keys: audit logs and infrastructure journal logs do not have namespace or pod name. \n Note: the set of labels should be small, Loki imposes limits on the size and number of labels allowed. See https://grafana.com/docs/loki/latest/configuration/#limits_config for more. You can still query based on any log record field using query filters."
                          items:
                            type: string
                          type: array
                        tenantKey:
                          description: 'TenantKey is a meta-data key field to use as the TenantID, For example: ''TenantKey: kubernetes.namespace_name` will use the kubernetes namespace as the tenant ID.'
                          type: string
                      type: object
                    name:
                      description: Name used to refer to the output from a `pipeline`.
                      type: string
                    secret:
                      description: "Secret for authentication. Name of a secret in the same namespace as the cluster logging operator. \n All sensitive authentication information is provided via a kubernetes Secret object. A Secret is a key:value map, common keys are described here. Some output types support additional specialized keys, documented with the output-specific configuration field. All secret keys are optional, enable the security features you want by setting the relevant keys. \n Transport Layer Security (TLS) \n Using a TLS URL ('https://...' or 'ssl://...') without any secret enables basic TLS: client authenticates server using system default certificate authority. \n Additional TLS features are enabled by including a Secret and setting the following optional fields: \n   `tls.crt`: (string) File name containing a client certificate.     Enables mutual authentication. Requires `tls.key`.   `tls.key`: (string) File name containing the private key to unlock the client certificate.     Requires `tls.crt`   `passphrase`: (string) Passphrase to decode an encoded TLS private key.     Requires tls.key.   `ca-bundle.crt`: (string) File name of a custom CA for server authentication. \n Username and Password \n   `username`: (string) Authentication user name. Requires `password`.   `password`: (string) Authentication password. Requires `username`. \n Simple Authentication Security Layer (SASL) \n   `sasl.enable`: (boolean) Explicitly enable or disable SASL.     If missing, SASL is automatically enabled when any of the other `sasl.` keys are set.   `sasl.mechanisms`: (array) List of allowed SASL mechanism names.     If missing or empty, the system defaults are used.   `sasl.allow-insecure`: (boolean) Allow mechanisms that send clear-text passwords.     Default false."
                      properties:
                        name:
                          description: Name of a secret in the namespace configured for log forwarder secrets.
                          type: string
                      required:
                      - name
                      type: object
                    syslog:
                      description: Syslog provides optional extra properties for output type `syslog`
                      properties:
                        addLogSource:
                          description: AddLogSource adds log's source information to the log message If the logs are collected from a process; namespace_name, pod_name, container_name is added to the log In addition, it picks the originating process name and id(known as the `pid`) from the record and injects them into the header field."
                          type: boolean
                        appName:
                          description: "AppName is APP-NAME part of the syslog-msg header \n AppName needs to be specified if using rfc5424"
                          type: string
                        facility:
                          description: "Facility to set on outgoing syslog records. \n Facility values are defined in https://tools.ietf.org/html/rfc5424#section-6.2.1. The value can be a decimal integer. Facility keywords are not standardized, this API recognizes at least the following case-insensitive keywords (defined by https://en.wikipedia.org/wiki/Syslog#Facility_Levels): \n     kernel user mail daemon auth syslog lpr news     uucp cron authpriv ftp ntp security console solaris-cron     local0 local1 local2 local3 local4 local5 local6 local7"
                          type: string
                        msgID:
                          description: "MsgID is MSGID part of the syslog-msg header \n MsgID needs to be specified if using rfc5424"
                          type: string
                        payloadKey:
                          description: PayloadKey specifies record field to use as payload.
                          type: string
                        procID:
                          description: "ProcID is PROCID part of the syslog-msg header \n ProcID needs to be specified if using rfc5424"
                          type: string
                        rfc:
                          default: RFC5424
                          description: "Rfc specifies the rfc to be used for sending syslog \n Rfc values can be one of:  - RFC3164 (https://tools.ietf.org/html/rfc3164)  - RFC5424 (https://tools.ietf.org/html/rfc5424) \n If unspecified, RFC5424 will be assumed."
                          enum:
                          - RFC3164
                          - RFC5424
                          type: string
                        severity:
                          description: "Severity to set on outgoing syslog records. \n Severity values are defined in https://tools.ietf.org/html/rfc5424#section-6.2.1 The value can be a decimal integer or one of these case-insensitive keywords: \n     Emergency Alert Critical Error Warning Notice Informational Debug"
                          type: string
                        tag:
                          description: Tag specifies a record field to use as tag.
                          type: string
                        trimPrefix:
                          description: TrimPrefix is a prefix to trim from the tag.
                          type: string
                      type: object
                    type:
                      description: Type of output plugin.
                      enum:
                      - syslog
                      - fluentdForward
                      - elasticsearch
                      - kafka
                      - cloudwatch
                      - loki
                      type: string
                    url:
                      description: "URL to send log records to. \n An absolute URL, with a scheme. Valid schemes depend on `type`. Special schemes `tcp`, `tls`, `udp` and `udps` are used for types that have no scheme of their own. For example, to send syslog records using secure UDP: \n     { type: syslog, url: udps://syslog.example.com:1234 } \n Basic TLS is enabled if the URL scheme requires it (for example 'https' or 'tls'). The 'username@password' part of `url` is ignored. Any additional authentication material is in the `secret`. See the `secret` field for more details."
                      pattern: ^$|[a-zA-z]+:\/\/.*
                      type: string
                  required:
                  - name
                  - type
                  type: object
                type: array
              pipelines:
                description: Pipelines forward the messages selected by a set of inputs to a set of outputs.
                items:
                  properties:
                    detectMultilineErrors:
                      description: DetectMultilineErrors enables multiline error detection of container logs
                      type: boolean
                    inputRefs:
                      description: "InputRefs lists the names (`input.name`) of inputs to this pipeline. \n The following built-in input names are always available: \n `application` selects all logs from application pods. \n `infrastructure` selects logs from openshift and kubernetes pods and some node logs. \n `audit` selects node logs related to security audits."
                      items:
                        type: string
                      type: array
                    labels:
                      additionalProperties:
                        type: string
                      description: Labels lists labels applied to this pipeline
                      type: object
                    name:
                      description: Name is optional, but must be unique in the `pipelines` list if provided.
                      type: string
                    outputRefs:
                      description: "OutputRefs lists the names (`output.name`) of outputs from this pipeline. \n The following built-in names are always available: \n 'default' Output to the default log store provided by ClusterLogging."
                      items:
                        type: string
                      type: array
                    parse:
                      description: "Parse enables parsing of log entries into structured logs \n Logs are parsed according to parse value, only `json` is supported as of now."
                      enum:
                      - json
                      type: string
                  required:
                  - inputRefs
                  - outputRefs
                  type: object
                type: array
            type: object
          status:
            description: ClusterLogForwarderStatus defines the observed state of ClusterLogForwarder
            properties:
              conditions:
                description: Conditions of the log forwarder.
                items:
                  description: "Condition represents an observation of an object's state. Conditions are an extension mechanism intended to be used when the details of an observation are not a priori known or would not apply to all instances of a given Kind. \n Conditions should be added to explicitly convey properties that users and components care about rather than requiring those properties to be inferred from other observations. Once defined, the meaning of a Condition can not be changed arbitrarily - it becomes part of the API, and has the same backwards- and forwards-compatibility concerns of any other part of the API."
                  properties:
                    lastTransitionTime:
                      format: date-time
                      type: string
                    message:
                      type: string
                    reason:
                      description: ConditionReason is intended to be a one-word, CamelCase representation of the category of cause of the current status. It is intended to be used in concise output, such as one-line kubectl get output, and in summarizing occurrences of causes.
                      type: string
                    status:
                      type: string
                    type:
                      description: "ConditionType is the type of the condition and is typically a CamelCased word or short phrase. \n Condition types should indicate state in the \"abnormal-true\" polarity. For example, if the condition indicates when a policy is invalid, the \"is valid\" case is probably the norm, so the condition should be called \"Invalid\"."
                      type: string
                  required:
                  - status
                  - type
                  type: object
                type: array
              inputs:
                additionalProperties:
                  description: Conditions is a set of Condition instances.
                  items:
                    description: "Condition represents an observation of an object's state. Conditions are an extension mechanism intended to be used when the details of an observation are not a priori known or would not apply to all instances of a given Kind. \n Conditions should be added to explicitly convey properties that users and components care about rather than requiring those properties to be inferred from other observations. Once defined, the meaning of a Condition can not be changed arbitrarily - it becomes part of the API, and has the same backwards- and forwards-compatibility concerns of any other part of the API."
                    properties:
                      lastTransitionTime:
                        format: date-time
                        type: string
                      message:
                        type: string
                      reason:
                        description: ConditionReason is intended to be a one-word, CamelCase representation of the category of cause of the current status. It is intended to be used in concise output, such as one-line kubectl get output, and in summarizing occurrences of causes.
                        type: string
                      status:
                        type: string
                      type:
                        description: "ConditionType is the type of the condition and is typically a CamelCased word or short phrase. \n Condition types should indicate state in the \"abnormal-true\" polarity. For example, if the condition indicates when a policy is invalid, the \"is valid\" case is probably the norm, so the condition should be called \"Invalid\"."
                        type: string
                    required:
                    - status
                    - type
                    type: object
                  type: array
                description: Inputs maps input name to condition of the input.
                type: object
              outputs:
                additionalProperties:
                  description: Conditions is a set of Condition instances.
                  items:
                    description: "Condition represents an observation of an object's state. Conditions are an extension mechanism intended to be used when the details of an observation are not a priori known or would not apply to all instances of a given Kind. \n Conditions should be added to explicitly convey properties that users and components care about rather than requiring those properties to be inferred from other observations. Once defined, the meaning of a Condition can not be changed arbitrarily - it becomes part of the API, and has the same backwards- and forwards-compatibility concerns of any other part of the API."
                    properties:
                      lastTransitionTime:
                        format: date-time
                        type: string
                      message:
                        type: string
                      reason:
                        description: ConditionReason is intended to be a one-word, CamelCase representation of the category of cause of the current status. It is intended to be used in concise output, such as one-line kubectl get output, and in summarizing occurrences of causes.
                        type: string
                      status:
                        type: string
                      type:
                        description: "ConditionType is the type of the condition and is typically a CamelCased word or short phrase. \n Condition types should indicate state in the \"abnormal-true\" polarity. For example, if the condition indicates when a policy is invalid, the \"is valid\" case is probably the norm, so the condition should be called \"Invalid\"."
                        type: string
                    required:
                    - status
                    - type
                    type: object
                  type: array
                description: Outputs maps output name to condition of the output.
                type: object
              pipelines:
                additionalProperties:
                  description: Conditions is a set of Condition instances.
                  items:
                    description: "Condition represents an observation of an object's state. Conditions are an extension mechanism intended to be used when the details of an observation are not a priori known or would not apply to all instances of a given Kind. \n Conditions should be added to explicitly convey properties that users and components care about rather than requiring those properties to be inferred from other observations. Once defined, the meaning of a Condition can not be changed arbitrarily - it becomes part of the API, and has the same backwards- and forwards-compatibility concerns of any other part of the API."
                    properties:
                      lastTransitionTime:
                        format: date-time
                        type: string
                      message:
                        type: string
                      reason:
                        description: ConditionReason is intended to be a one-word, CamelCase representation of the category of cause of the current status. It is intended to be used in concise output, such as one-line kubectl get output, and in summarizing occurrences of causes.
                        type: string
                      status:
                        type: string
                      type:
                        description: "ConditionType is the type of the condition and is typically a CamelCased word or short phrase. \n Condition types should indicate state in the \"abnormal-true\" polarity. For example, if the condition indicates when a policy is invalid, the \"is valid\" case is probably the norm, so the condition should be called \"Invalid\"."
                        type: string
                    required:
                    - status
                    - type
                    type: object
                  type: array
                description: Pipelines maps pipeline name to condition of the pipeline.
                type: object
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []
