Uploaded image for project: 'Docs for Red Hat Developers'
  1. Docs for Red Hat Developers
  2. RHDEVDOCS-3091

Bug 1936367 - [RHOCP4.7] Invalid YAML definition for clusterlogging instance

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Duplicate
    • Icon: Undefined Undefined
    • OpenShift 4.7 Async
    • OpenShift 4.7 Async
    • Logging
    • 3
    • Undefined

      We were unable to create the clusterlogging instance according to the YAML definition provided in OCP4.7 docs. The YAML definition seems to be incorrect.

      • The indentation for proxy components is incorrect.
      • "limits" and "requests" should be in "resources:" section(which is missing).

      https://docs.openshift.com/container-platform/4.7/logging/cluster-logging-deploying.html

      apiVersion: "logging.openshift.io/v1" 
      kind: "ClusterLogging" 
      metadata:
        name: "instance" 
        namespace: "openshift-logging" 
      spec:
        managementState: "Managed" 
        logStore:
          type: "elasticsearch" 
          retentionPolicy:
            application:
              maxAge: 1d
            infra:
              maxAge: 7d
            audit:
              maxAge: 7d
          elasticsearch:
            nodeCount: 3
            storage:
              storageClassName: "<storage-class-name>" 
              size: 200G
            resources:
              requests:
                memory: "8Gi" 
            proxy:    <== The indentation for proxy components is incorrect. 
              limits: <== "limits" and "requests" should be under (missing) "resources:"
                memory: 256Mi
              requests:
                 memory: 256Mi
            redundancyPolicy: "SingleRedundancy" 
        visualization:
          type: "kibana" 
          kibana:
            replicas: 1
        curation:
          type: "curator" 
          curator:
            schedule: "30 3 * * *" 
        collection:
          logs:
            type: "fluentd" 
            fluentd: {}
      

      The code that works:

      apiVersion: "logging.openshift.io/v1" 
      kind: "ClusterLogging" 
      metadata:
        name: "instance" 
        namespace: "openshift-logging" 
      spec:
        managementState: "Managed" 
        logStore:
          type: "elasticsearch" 
          retentionPolicy:
            application:
              maxAge: 1d
            infra:
              maxAge: 7d
            audit:
              maxAge: 7d
          elasticsearch:
            nodeCount: 3
            nodeSelector:
                node-role.kubernetes.io/infra: ''
            storage:
              storageClassName: "" 
              size: 30G
            resources:
              limits:
                memory: 1Gi
              requests:
                cpu: 200m
                memory: 1Gi
          proxy:               <====  Indentation is okay. 
            resources:         <====  "limits" and "requests" is defined under resources
              limits:          <====
                memory: 150Mi  <====
              requests:        <====
                memory: 150Mi  <====
            redundancyPolicy: "SingleRedundancy" 
        visualization:
          type: "kibana" 
          kibana:
            nodeSelector:
                node-role.kubernetes.io/infra: ''
            replicas: 1
        curation:
          type: "curator" 
          curator:
            nodeSelector:
                node-role.kubernetes.io/infra: ''
            schedule: "30 3 * * *" 
        collection:
          logs:
            type: "fluentd" 
            fluentd: {}
      

              Unassigned Unassigned
              rdlugyhe Rolfe Dlugy-Hegwer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: