Uploaded image for project: 'OpenShift Console'
  1. OpenShift Console
  2. CONSOLE-5066

Refactor ResourceEventStream for Performance and Impersonation Support

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • openshift-4.22
    • None
    • None
    • None
    • None
    • OCP Console - Sprint 284

      As a Console developer, I want to refactor the ResourceEventStream component to use standard Kubernetes watch hooks so that we reduce API server load and correctly support user impersonation.

      The current custom implementation of the event stream is suboptimal for large clusters. It currently hammers the API server by potentially fetching thousands of events whenever a user hits the homepage. Additionally, the current WebSocket implementation does not correctly support impersonation headers.

      We need to replace the custom WebSocket logic with the useK8sWatchResource hook.

      • List-then-Watch Logic: Ensure the component performs a "list" first to obtain a resource version before opening the watch, preventing the re-transmission of all historical events.
      • Impersonation: Verify that the new hook implementation correctly passes impersonation headers to the API server.

      AC:  The component no longer receives all cluster events as "added" messages upon every page load.

      • Event streams work correctly when the Console is used in impersonation mode.
      • The implementation leverages useK8sWatchResource instead of custom WebSocket code.

              rh-ee-kragarwa Krish Agarwal
              jhadvig@redhat.com Jakub Hadvig
              None
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: