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

Service/secret is not deleted when the inputs.receiver.http is removed

    XMLWordPrintable

Details

    • False
    • None
    • False
    • NEW
    • NEW
    • Before this change, HTTP input services and their associated secrets were not cleaned up when the ClusterLogForwader was modified to remove the inputs.receiver section. This change properly cleans up HTTP input resources when they are no longer needed.
    • Bug Fix
    • Log Collection - Sprint 243, Log Collection - Sprint 244, Log Collection - Sprint 245

    Description

      Description of problem:

      When the inputs.receiver section is removed from ClusterLogForwarder. The http service, secret are not removed.

      Steps to Reproduce:

      1. Enable inputs.receiver.http

      cat <<EOF |  oc apply -f -
      apiVersion: logging.openshift.io/v1
      kind: ClusterLogForwarder
      metadata:
        name: instance
      spec:
        inputs:
          - name: input-http1
            receiver:
              http: 
                format: kubeAPIAudit
                port: 9443
        pipelines:
          - name: to-default
            inputRefs:
            - input-http1
            - application
            outputRefs:
            - default
      EOF
      

      2. verify the service input-http1 is created.
      $oc get svc input-http1
      NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
      input-http1 ClusterIP 172.30.40.80 <none> 443/TCP 10m
      [anli@preserve-docker-slave 239223]$

      3. Delete the inputs.receiver

      cat <<EOF |  oc apply --all --prune -f -
      apiVersion: logging.openshift.io/v1
      kind: ClusterLogForwarder
      metadata:
        name: instance
      spec:
        pipelines:
          - name: to-default
            inputRefs:
            - application
            outputRefs:
            - default
      EOF
      

      4. Verify svc&secret for input-http1 are removed.
      $oc get svc input-http1
      NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
      httpserver1 ClusterIP 172.30.40.80 <none> 443/TCP 14m

      $oc get secret input-http1
      NAME TYPE DATA AGE
      input-http1 kubernetes.io/tls 2 14m

      Expected results:

      service input-http1 and secret input-http1 are deleted once the inputs section is removed.

      Additional info:

      All resource are deleted after CLF is removed.

      Attachments

        Activity

          People

            rh-ee-calee Calvin Lee
            rhn-support-anli Anping Li
            Anping Li Anping Li
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: