Uploaded image for project: 'OpenShift Logging'
  1. OpenShift Logging
  2. LOG-4939

[release-5.9]Unability to configure nodeSelector and toleration for logging-view-plugin

XMLWordPrintable

    • False
    • None
    • False
    • NEW
    • NEW
    • Before this update, the logging view plugin did not allow for custom node placement and tolerations. This update adds the ability to define node placement and tolerations for the logging view plugin.
    • Release Note Not Required
    • Log Collection - Sprint 247
    • Moderate

      Description of problem:

      In Logging 5.9, even, when it's defined the `nodeSelector` and/or `tolerations` as described in the fix released in 5.7.2 in https://issues.redhat.com/browse/LOG-3749 , it's not working and it's not documented in the clusterlogging API:

      $ oc explain clusterlogging.spec.visualization
      KIND:     ClusterLogging
      VERSION:  logging.openshift.io/v1DESCRIPTION:
           Specification of the Visualization component for the cluster
       

      At the same time, reviewing the code the PR from LOG-3749, it's visible that the option for being able to define the `nodeSelector` and `tolerations` was introduced, but checking the master branch of the cluster-logging-operator that same option doesn't exist and also, it doesn't exists for the 5.8 branch .

      Needed to say that it works for Logging 5.7. Then, seems that the feature was never introduced in posterior versions of Logging 5.7.

      Version-Release number of selected component (if applicable):

      Logging 5.8 latest z versions:

      $ oc get csv -n openshift-logging
      NAME                     DISPLAY                     VERSION   REPLACES                 PHASE
      cluster-logging.v5.8.1   Red Hat OpenShift Logging   5.8.1     cluster-logging.v5.8.0   Succeeded
        

      How reproducible:

      Always

      Steps to Reproduce:

      Label a node

      $ oc label node node1.example.com console=run
      

      Define the visualization section in the clusterLogging CR with a nodeSelector

      $ cat << EOF | oc create -f -
      apiVersion: logging.openshift.io/v1
      kind: ClusterLogging
      metadata:
        name: instance
        namespace: openshift-logging
      spec:
        collection:
          type: vector
        logStore:
          lokistack:
            name: logging-loki
          type: lokistack
        managementState: Managed
        visualization:
          type: "ocp-console"
          nodeSelector:
            console: run
      EOF
      clusterlogging.logging.openshift.io/instance created

      Actual results:

      Review the clusterlogging instance and verify  the `nodeSelector` for the visualization it not present:

      $ oc get clusterlogging instance -o yaml -n openshift-logging
      apiVersion: logging.openshift.io/v1
      kind: ClusterLogging
      metadata:
        creationTimestamp: "2023-12-21T10:35:10Z"
        generation: 1
        name: instance
        namespace: openshift-logging
        resourceVersion: "50361"
        uid: 68e75278-5816-4d76-87d4-8eb585ccf52c
      spec:
        collection:
          type: vector
        logStore:
          lokistack:
            name: logging-loki
          type: lokistack
        managementState: Managed
        visualization:
          type: ocp-console
      status:
      ...
      

      Verify that the `logging-view-plugin` deployment has not defined the `nodeSelector`

      $ oc get deployment.apps/logging-view-plugin -o yaml -n openshift-logging|grep -ic nodeSelector 
      0
      

      Expected results:

      The `logging-view-plugin` takes into consideraton the `nodeSelector` and/or tolerations defined in `spec.visualization.nodeSelector` and/or `spec.visualization.tolerations` in Logging 5.8 and newer versions as it's possible now in Logging 5.7 after being released the fix for  LOG-3749

       

      Additional notes:

      This requires documentation in:

       - https://docs.openshift.com/container-platform/4.14/logging/config/cluster-logging-tolerations.html

       - https://docs.openshift.com/container-platform/4.14/logging/config/cluster-logging-moving-nodes.html

              rh-ee-calee Calvin Lee
              rhn-support-ocasalsa Oscar Casal Sanchez
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: