Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-22045

Design: Refactor KubeVirt code to separate metrics code from the core operator code - proposal

XMLWordPrintable

    • kubevirt-metrics-code-refactoring-design
    • Hide

      Refactoring design is ready and discussed on the kubevirt community level.

      Show
      Refactoring design is ready and discussed on the kubevirt community level.
    • Yellow
    • To Do
    • CNV-8094 - CNV Observability
    • 0% To Do, 0% In Progress, 100% Done
    • dev-ready, doc-ready, po-ready, qe-ready, ux-ready
    • Hide

      2023-09-28: (long review process is still in progress)...

      Show
      2023-09-28: (long review process is still in progress)...

      Goal

      The KubeVirt metrics code is currently embedded in the heart of the operator code.
      This causes issues with code readability, code complexity and maintainability etc.
      We would like to propose, discuss and get agreement on how to proceed with having metrics and monitoring code and logic in a separate place in code.

      PR introducing the package is merged on 4.15 version of kubevirt.

      User Stories

      • As a core KubeVirt Developer I want be able to have a readable code, that is not cluttered with monitoring code and is easier to maintaine.
      • As a KubeVirt monitoring developer I would like to have the metrics and all of the monitoring code and logic in a separate place where it will be easier to read and maintain.
        As part of CNV-21957 it will be decided on how to refactor the code so it will:
      • Enhance development speed
      • Decouple the monitoring code from operator code
      • Enhance security: monitor publicly available data only
      • Become more modular and generic - resilient to future changes
      • As a user I would like to be able to opt-in and opt-out of specific metrics types.

        Non-Requirements

      • List of things not included in this epic, to alleviate any doubt raised during the grooming process.

      Notes

      • we are mainly focusing on kubevirt/kubevirt (we will eventually extend it to other operators later on), it's just about code refactoring, no impact on existing tier2 (and maybe also tier1) tests.
      • at the first step we think only about refactoring the code but continue executing it in the same pod where is now. We can think later on to move it to a different container or even different pod.
      • Design doc: https://docs.google.com/document/d/1FoBdaCcJXo5ru5DnmXhNXYHCarYBVZbDLkcpEdGmfec/edit?usp=sharing

      Done Checklist

      Who What Reference
      DEV Upstream roadmap issue (or individual upstream PRs) https://github.com/kubevirt/kubevirt/pull/10044
      DEV Upstream documentation merged N/A
      DEV gap doc updated N/A
      DEV Upgrade consideration N/A
      DEV CEE/PX summary presentation N/A
      QE Test plans in Polarion N/A
      QE Automated tests merged N/A
      DOC Downstream documentation merged N/A

            sradco Shirly Radco
            sradco Shirly Radco
            Debarati Basu-Nag Debarati Basu-Nag
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: