#! validate-crd: deploy/chart/templates/0000_30_02-clusterserviceversion.crd.yaml
#! parse-kind: ClusterServiceVersion
apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
  # The version value is substituted by the ART pipeline
  name: clusterlogging.v5.3.0
  namespace: placeholder
  labels:
    "operatorframework.io/arch.amd64": supported
    "operatorframework.io/arch.ppc64le": supported
    "operatorframework.io/arch.s390x": supported
  annotations:
    "operatorframework.io/suggested-namespace": openshift-logging
    "operatorframework.io/cluster-monitoring": "true"
    "operators.openshift.io/infrastructure-features": '["disconnected","proxy-aware"]'
    capabilities: Seamless Upgrades
    categories: "OpenShift Optional, Logging & Tracing"
    certified: "false"
    description: |-
      The Red Hat OpenShift Logging Operator for OCP provides a means for configuring and managing your aggregated logging stack.
    containerImage: quay.io/openshift-logging/cluster-logging-operator:latest
    createdAt: 2018-08-01T08:00:00Z
    support: AOS Logging
    # The version value is substituted by the ART pipeline
    olm.skipRange: ">=4.6.0-0 <5.3.0"
    # This annotation injection is a workaround for BZ-1950047, since the associated
    # annotation in spec.install.spec.deployments.template.metadata is presently ignored.
    # TODO: remove the next line after BZ-1950047 is resolved.
    target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
    alm-examples: |-
        [
          {
            "apiVersion": "logging.openshift.io/v1",
            "kind": "ClusterLogging",
            "metadata": {
              "name": "instance",
              "namespace": "openshift-logging"
            },
            "spec": {
              "managementState": "Managed",
              "logStore": {
                "type": "elasticsearch",
                "elasticsearch": {
                  "nodeCount": 3,
                  "redundancyPolicy": "SingleRedundancy",
                  "storage": {
                    "storageClassName": "gp2",
                    "size": "200G"
                  }
                },
                "retentionPolicy":{
                  "application":{
                    "maxAge":"7d"
                  }
                }
              },
              "visualization": {
                "type": "kibana",
                "kibana": {
                  "replicas": 1
                }
              },
              "collection": {
                "logs": {
                  "type": "fluentd",
                  "fluentd": {}
                }
              }
            }
          },
          {
            "apiVersion": "logging.openshift.io/v1",
            "kind": "ClusterLogForwarder",
            "metadata": {
              "name": "instance",
              "namespace": "openshift-logging"
            },
            "spec": {
              "outputs": [
                {
                  "name": "remote-elasticsearch",
                  "type": "elasticsearch",
                  "url": "remote.example.org:9200",
                  "secret": {
                    "name": "elasticsearch"
                  }
                }
              ],
              "pipelines": [
                {
                  "name": "enable-default-log-store",
                  "inputRefs": ["application", "infrastructure", "audit"],
                  "outputRefs": ["default"]
                },
                {
                  "name": "forward-to-remote",
                  "inputRefs": ["application"],
                  "outputRefs": ["remote-elasticsearch"]
                }
              ]
            }
          }
        ]
spec:
  # The version value is substituted by the ART pipeline
  version: 5.3.0
  displayName: Red Hat OpenShift Logging
  minKubeVersion: 1.18.3
  description: |
    # Red Hat OpenShift Logging
    The Red Hat OpenShift Logging Operator orchestrates and manages the aggregated logging stack as a cluster-wide service.

    ##Features
    * **Create/Destroy**: Launch and create an aggregated logging stack to support the entire OCP cluster.
    * **Simplified Configuration**: Configure your aggregated logging cluster's structure like components and end points easily.

    ## Prerequisites and Requirements
    ### Red Hat OpenShift Logging Namespace
    Cluster logging and the Red Hat OpenShift Logging Operator is only deployable to the **openshift-logging** namespace. This namespace
    must be explicitly created by a cluster administrator (e.g. `oc create ns openshift-logging`). To enable metrics
    service discovery add namespace label `openshift.io/cluster-monitoring: "true"`.

    For additional installation documentation see [Deploying cluster logging](https://docs.openshift.com/container-platform/latest/logging/cluster-logging-deploying.html)
    in the OpenShift product documentation.

    ### Elasticsearch Operator
    The Elasticsearch Operator is responsible for orchestrating and managing cluster logging's Elasticsearch cluster.  This
    operator must be deployed to the global operator group namespace
    ### Memory Considerations
    Elasticsearch is a memory intensive application.  Red Hat OpenShift Logging will specify that each Elasticsearch node needs
    16G of memory for both request and limit unless otherwise defined in the ClusterLogging custom resource. The initial
    set of OCP nodes may not be large enough to support the Elasticsearch cluster.  Additional OCP nodes must be added
    to the OCP cluster if you desire to run with the recommended(or better) memory. Each ES node can operate with a
    lower memory setting though this is not recommended for production deployments.

  keywords: ['elasticsearch', 'kibana', 'fluentd', 'logging', 'aggregated', 'efk']

  maintainers:
  - name: Red Hat
    email: aos-logging@redhat.com

  provider:
    name: Red Hat


  links:
  - name: Elastic
    url: https://www.elastic.co/
  - name: Fluentd
    url: https://www.fluentd.org/
  - name: Documentation
    url: https://github.com/openshift/cluster-logging-operator/blob/master/README.md
  - name: Red Hat OpenShift Logging Operator
    url: https://github.com/openshift/cluster-logging-operator
  installModes:
  - type: OwnNamespace
    supported: true
  - type: SingleNamespace
    supported: true
  - type: MultiNamespace
    supported: false
  - type: AllNamespaces
    supported: false
  install:
    strategy: deployment
    spec:
      permissions:
      - serviceAccountName: cluster-logging-operator
        rules:
        - apiGroups:
          - logging.openshift.io
          resources:
          - "*"
          verbs:
          - "*"
        - apiGroups:
          - ""
          resources:
          - pods
          - services
          - endpoints
          - persistentvolumeclaims
          - events
          - configmaps
          - secrets
          - serviceaccounts
          - serviceaccounts/finalizers
          - services/finalizers
          verbs:
          - "*"
        - apiGroups:
          - apps
          resources:
          - deployments
          - daemonsets
          - replicasets
          - statefulsets
          verbs:
          - "*"
        - apiGroups:
          - route.openshift.io
          resources:
          - routes
          - routes/custom-host
          verbs:
          - "*"
        - apiGroups:
          - batch
          resources:
          - cronjobs
          verbs:
          - "*"
        - apiGroups:
          - rbac.authorization.k8s.io
          resources:
          - roles
          - rolebindings
          verbs:
          - "*"
        - apiGroups:
          - monitoring.coreos.com
          resources:
          - servicemonitors
          - prometheusrules
          verbs:
          - "*"
        - apiGroups:
          - apps
          resources:
          - deployments/finalizers
          resourceNames:
          - "cluster-logging-operator"
          verbs:
          - "update"
      clusterPermissions:
      - serviceAccountName: cluster-logging-operator
        rules:
        - apiGroups:
          - console.openshift.io
          resources:
          - consoleexternalloglinks
          verbs:
          - "*"
        - apiGroups:
          - ""
          resources:
          - configmaps
          verbs:
          - "*"
        - apiGroups:
          - scheduling.k8s.io
          resources:
          - priorityclasses
          verbs:
          - "*"
        - apiGroups:
          - oauth.openshift.io
          resources:
          - oauthclients
          verbs:
          - "*"
        - apiGroups:
          - rbac.authorization.k8s.io
          resources:
          - clusterroles
          - clusterrolebindings
          verbs:
          - "*"
        - apiGroups:
          - config.openshift.io
          resources:
          - proxies
          - infrastructures
          verbs:
          - get
          - list
          - watch
        - apiGroups:
          - security.openshift.io
          resources:
          - securitycontextconstraints
          verbs:
          - create
        - apiGroups:
          - ""
          resources:
          - pods
          - namespaces
          - services
          - services/finalizers
          verbs:
          - get
          - list
          - watch
      deployments:
      - name: cluster-logging-operator
        spec:
          replicas: 1
          selector:
            matchLabels:
              name: cluster-logging-operator
          template:
            metadata:
              annotations:
                target.workload.openshift.io/management: '{"effect": "PreferredDuringScheduling"}'
              labels:
                name: cluster-logging-operator
            spec:
              nodeSelector:
                kubernetes.io/os: linux
              serviceAccountName: cluster-logging-operator
              containers:
              - name: cluster-logging-operator
                image: quay.io/openshift-logging/cluster-logging-operator:latest
                imagePullPolicy: IfNotPresent
                command:
                - cluster-logging-operator
                env:
                  - name: WATCH_NAMESPACE
                    valueFrom:
                      fieldRef:
                        fieldPath: metadata.annotations['olm.targetNamespaces']
                  - name: POD_NAME
                    valueFrom:
                      fieldRef:
                        fieldPath: metadata.name
                  - name: OPERATOR_NAME
                    value: "cluster-logging-operator"
                  - name: FLUENTD_IMAGE
                    value: "quay.io/openshift-logging/fluentd:1.7.4"
                  - name: LOGFILEMETRICEXPORTER_IMAGE
                    value: "quay.io/openshift-logging/log-file-metric-exporter:1.0"
  customresourcedefinitions:
    owned:
    - name: clusterloggings.logging.openshift.io
      version: v1
      kind: ClusterLogging
      displayName: Cluster Logging
      description: A Red Hat OpenShift Logging instance
      resources:
      - kind: Deployment
        version: v1
      - kind: DaemonSet
        version: v1
      - kind: CronJob
        version: v1beta1
      - kind: ReplicaSet
        version: v1
      - kind: Pod
        version: v1
      - kind: ConfigMap
        version: v1
      - kind: Secret
        version: v1
      - kind: Service
        version: v1
      - kind: Route
        version: v1
      - kind: Elasticsearch
        version: v1
      - kind: ClusterLogForwarder
        version: v1
      specDescriptors:
      - description: The desired number of Kibana Pods for the Visualization component
        displayName: Kibana Size
        path: visualization.kibana.replicas
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:podCount'
      - description: Resource requirements for the Kibana pods
        displayName: Kibana Resource Requirements
        path: visualization.kibana.resources
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:resourceRequirements'
      - description: The node selector to use for the Kibana Visualization component
        displayName: Kibana Node Selector
        path: visualization.kibana.nodeSelector
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:nodeSelector'
      - description: The desired number of Elasticsearch Nodes for the Log Storage component
        displayName: Elasticsearch Size
        path: logStore.elasticsearch.nodeCount
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:podCount'
      - description: Resource requirements for each Elasticsearch node
        displayName: Elasticsearch Resource Requirements
        path: logStore.elasticsearch.resources
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:resourceRequirements'
      - description: The node selector to use for the Elasticsearch Log Storage component
        displayName: Elasticsearch Node Selector
        path: logStore.elasticsearch.nodeSelector
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:nodeSelector'
      - description: The storage class name to use for the Elasticsearch Log Storage component
        displayName: Elasticsearch Storage Class Name
        path: logStore.elasticsearch.storage.storageClassName
        x-descriptors:
        - 'urn:alm:descriptor:io.kubernetes:StorageClass'
      - description: Resource requirements for the Fluentd pods
        displayName: Fluentd Resource Requirements
        path: collection.logs.fluentd.resources
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:resourceRequirements'
      - description: The node selector to use for the Fluentd log collection component
        displayName: Fluentd node selector
        path: collection.logs.fluentd.nodeSelector
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:nodeSelector'
      - description: Resource requirements for the Curator pods
        displayName: Curator Resource Requirements
        path: curation.curator.resources
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:resourceRequirements'
      - description: The node selector to use for the Curator component
        displayName: Curator Node Selector
        path: curation.curator.nodeSelector
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:nodeSelector'
      - description: The cron schedule for the Curator component
        displayName: Curation Schedule
        path: curation.curator.schedule
      statusDescriptors:
      - description: The status for each of the Kibana pods for the Visualization component
        displayName: Kibana Status
        path: visualization.kibanaStatus[0].pods
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:podStatuses'
      - description: The status for each of the Elasticsearch Client pods for the Log Storage component
        displayName: Elasticsearch Client Pod Status
        path: logStore.elasticsearchStatus[0].pods.client
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:podStatuses'
      - description: The status for each of the Elasticsearch Data pods for the Log Storage component
        displayName: Elasticsearch Data Pod Status
        path: logStore.elasticsearchStatus[0].pods.data
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:podStatuses'
      - description: The status for each of the Elasticsearch Master pods for the Log Storage component
        displayName: Elasticsearch Master Pod Status
        path: logStore.elasticsearchStatus[0].pods.master
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:podStatuses'
      - description: The cluster status for each of the Elasticsearch Clusters for the Log Storage component
        displayName: Elasticsearch Cluster Health
        path: logStore.elasticsearchStatus[0].clusterHealth
      - description: The status for each of the Fluentd pods for the Log Collection component
        displayName: Fluentd status
        path: collection.logs.fluentdStatus.pods
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:podStatuses'
      - description: The status for migration of a clusterlogging instance
        displayName: Fluentd status
        path: migration
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:migrationStatus'
    - name: clusterlogforwarders.logging.openshift.io
      version: v1
      kind: ClusterLogForwarder
      displayName: Cluster Log Forwarder
      description: Defines destinations for forwarding selected logs.
      specDescriptors:
      - description: Definitions of input selectors for log messages.
        displayName: Forwarder Inputs
        path: forwarder.inputs
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:forwarderInputs'
      - description: Definitions of output destinations for log messages.
        displayName: Forwarder Outputs
        path: forwarder.outputs
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:forwarderOutputs'
      - description: Pipelines collect logs from inputs and forward them to outputs.
        displayName: Forwarder Pipelines
        path: forwarder.pipelines
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:forwarderPipelines'
      statusDescriptors:
      - description: Status conditions for the forwarder resource.
        displayName: Forwarder Conditions
        path: conditions
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:forwarderConditions'
      - description: Status conditions for individual log inputs
        displayName: Input Conditions
        path: inputs
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:inputConditions'
      - description: Status conditions for individual forwarder outputs
        displayName: Output Conditions
        path: outputs
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:outputConditions'
      - description: Status conditions for forwarder pipelines
        displayName: Pipeline Conditions
        path: pipelines
        x-descriptors:
        - 'urn:alm:descriptor:com.tectonic.ui:pipelineConditions'

  icon:
    - mediatype: image/svg+xml
      base64data: PHN2ZyBpZD0iYWZiNDE1NDktYzU3MC00OWI3LTg1Y2QtNjU3NjAwZWRmMmUxIiBkYXRhLW5hbWU9IkxheWVyIDEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDcyMS4xNSA3MjEuMTUiPgogIDxkZWZzPgogICAgPHN0eWxlPgogICAgICAuYTQ0OGZkZWEtNGE0Yy00Njc4LTk3NmEtYzM3ODUzMDhhZTA2IHsKICAgICAgICBmaWxsOiAjZGIzOTI3OwogICAgICB9CgogICAgICAuZTEzMzA4YjgtNzQ4NS00Y2IwLTk3NjUtOGE1N2I5M2Y5MWE2IHsKICAgICAgICBmaWxsOiAjY2IzNzI4OwogICAgICB9CgogICAgICAuZTc3Mjg2ZjEtMjJkYS00NGQxLThlZmItMWQxNGIwY2NhZTYyIHsKICAgICAgICBmaWxsOiAjZmZmOwogICAgICB9CgogICAgICAuYTA0MjBjYWMtZWJlNi00YzE4LWI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