apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  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:
            properties:
              name:
                enum:
                - instance
                type: string
            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
                      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
              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:
                    elasticsearch:
                      properties:
                        indexKey:
                          description: IndexKey specifies the metadata key to be used as name of elasticsearch index It takes precedence over IndexName
                          type: string
                        indexName:
                          description: IndexName specifies the name of elasticsearch schema
                          type: string
                      type: object
                    fluentdForward:
                      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
                    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 For client authentication, set secret keys `tls.crt` and `tls.key` to the client certificate and private key. \n To use your own certificate authority, set secret key `ca-bundle.crt`. \n Depending on the `type` there may be other secret keys that have meaning."
                      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
                          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
                      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:
                    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: ClusterLogForwarder represents the current status 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: {}
