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

[Vector] collector-config secret is not deleted after deleting the Cluster Logging instance.

XMLWordPrintable

    • False
    • None
    • False
    • NEW
    • NEW
    • Bug Fix
    • Log Collection - Sprint 233, Log Collection - Sprint 234

      Description of problem:

      After a Cluster Logging instance created with Vector as collector is deleted, the collector-config secret is not deleted. 

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

      cluster-logging.v5.7.0

      Server Version: 4.13.0-0.nightly-2023-03-14-053612

      How reproducible:

      Always

      Steps to Reproduce:

      *Create a Cluster Logging instance with Vector as collector.

      apiVersion: "logging.openshift.io/v1"
      kind: "ClusterLogging"
      metadata:
        name: "instance" 
        namespace: "openshift-logging"
      spec:
        managementState: "Managed"  
        logStore:
          type: "elasticsearch"  
          retentionPolicy: 
            application:
              maxAge: 10h
            infra:
              maxAge: 10h
            audit:
              maxAge: 10h
          elasticsearch:
            nodeCount: 1 
            storage: {} 
            resources: 
                limits:
                  memory: "4Gi"
                requests:
                  memory: "1Gi"
            proxy: 
              resources:
                limits:
                  memory: 256Mi
                requests:
                  memory: 256Mi
            redundancyPolicy: "ZeroRedundancy"
        visualization:
          type: "kibana"  
          kibana:
            replicas: 1
        collection:
          type: vector

      *Check that the collector-config secret is generated.

      $ oc get pods
      NAME                                            READY   STATUS    RESTARTS   AGE
      cluster-logging-operator-594f44b787-5lrlw       1/1     Running   0          31m
      collector-29gk8                                 2/2     Running   0          2m
      collector-4jz9r                                 2/2     Running   0          2m
      collector-5t7lz                                 2/2     Running   0          2m
      collector-9nr7z                                 2/2     Running   0          2m
      collector-q8wc5                                 2/2     Running   0          2m
      collector-xlldx                                 2/2     Running   0          2m
      collector-xtf6b                                 2/2     Running   0          2m
      elasticsearch-cdm-smhi9qr6-1-6cb477cb6c-fdztr   2/2     Running   0          106s
      kibana-85f5b77754-g2tdc                         2/2     Running   0          106s
      
      $ oc get secret | grep -i collector-config
      collector-config                           Opaque                                1      2m3s

      *Delete the cluster logging instance and check that the collector-config secret is still present. 

      $ oc delete clusterloggings.logging.openshift.io instance
      clusterlogging.logging.openshift.io "instance" deleted
      
      $ oc get pods
      NAME                                        READY   STATUS    RESTARTS   AGE
      cluster-logging-operator-594f44b787-5lrlw   1/1     Running   0          43m
      
      $ oc get secrets| grep -i collector-config 
      collector-config                           Opaque                                1      13m
      
      $ oc extract secret/collector-config --confirm
      vector.toml

      Expected results:

      The collector-config secret is deleted after deleting the cluster logging instance.

              vparfono Vitalii Parfonov
              rhn-support-ikanse Ishwar Kanse
              Ishwar Kanse Ishwar Kanse
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: