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

Improved namespace selection for logs

XMLWordPrintable

    • Icon: Epic Epic
    • Resolution: Obsolete
    • Icon: Undefined Undefined
    • None
    • None
    • Log Collection
    • None
    • Namespace Selectors
    • False
    • None
    • False
    • Not Selected
    • NEW
    • To Do
    • OBSDA-105 - Enable OpenShift Logging Operator Administrator to Collect Logs at the Infrastructure Namespace Level
    • OBSDA-105Enable OpenShift Logging Operator Administrator to Collect Logs at the Infrastructure Namespace Level
    • NEW
    • 0
    • 0% 0%

      Goals

      • Support namespace selectors for infrastructure logs as well as namespace.
      • Control selection of non-namespaced infrastructure logs.
      • Allow excluded namespaces and wildcard matches.
      • Use a consistent API for namespace selection.

      Motivation

      • Allow control of audit logs by namespace.
      • Allow collection from all namespaces excluding selected namespaces.
      • Allow collection by namespace following a pattern (e.g. openshift*)

      Acceptance Criteria

      Tests to demonstrate:

      • Selecting all infrastructure logs.
      • Selecting only namespaced infrastructure logs.
      • Selecting only non-namespaced (node) infrastructure logs.
      • Excluding/including selected namespace patterns with or without node logs.

      Documentation Considerations

      Required in CLF doc.

      Design

      Special values for the namespaces list:

      • "-" means all non-namespaced logs.
      • "*" means all namespaced logs.
      • "x*y" glob-style pattern matching.
      • "name" leading "" means exclude namespaces matching this pattern.

      Note there is no notation to "exclude non-namespaced logs", they are included if no namespaces are listed, excluded if any namespaces are listed (including "*") and the non-namespaced marker "-" is missing.missing.

      Namespaces is now allowed in the   input.infrastructure section, examples:

      inputs:
        - name: infra_all
          infrastructure: # Empty section selects everything
      
        - name: infra_namespaced_only
          infrastructure:
            namespaces: ["*"]
      
        - name: infra_selected_namespaces
          infrastructure:
            namespaces: ["foo", "bar"]
      
        - name: infra_node_only
          infrastructure:
            namespaces: ["-"]
      
        - name: infra_node_and_selected_namespaces
          infrastructure:
            namespaces: ["-", "foo", "bar"] 

      Some application include/exclude and wildcard examples:

      inputs:
        - name: starts_with_foo
          application:
            namespaces: ["foo*"]
      
       - name: does_not_start_with_foo
         application:
            namespaces: ["-foo*"]
      
             

      Namespaces are matched against the list in order, for example [ "foo*", "-bar", ""]

      • Includes any namespace starting with "foo", e.g. "foobar", "foo-x-bar"
      • Excludes any namespace ending in "bar", e.g. "x-bar", "x-foo-bar"
      • Includes  any other namespace that does not end in "bar"

            Unassigned Unassigned
            rhn-engineering-aconway Alan Conway
            Qiaoling Tang Qiaoling Tang
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: