rancher-desktop icon indicating copy to clipboard operation
rancher-desktop copied to clipboard

Epic: Backend Refactoring (splitting out K8s)

Open mook-as opened this issue 2 years ago • 2 comments

We want to refactor the KubernetesBackend related code to have a cleaner split between things that deal with the VM / runtime environment, and things involved in running Kubernetes. This is to make code dealing with disabling Kubernetes to be cleaner, as well as to limit the responsibility of each portion of code. It is also to help with follow-up work to use REST APIs for the UI.

This will need to consider the parallel work done in #1793 and related (where we split out the integration code), as well as the efforts around CLI / REST API (#1748, #1896).

Involved tasks:

  • [x] #2160
    • Use state changed events to mange helper processes lifetimes.
  • [x] #2267
  • [x] #2266
  • [x] Rename KubernetesBackend to VMBackend
  • [x] Add ability to execute commands to VMBackend (or other interface only exposed to KubernetesBackend)
  • [ ] Create new KubernetesBackend interface
    • Callers still use VMBackend; it is just internally forwarded to KubernetesBackend
    • [ ] Implement KuberentesBackend for WSL
    • [ ] Implement KubernetesBackend for Lima
  • [ ] Remove forwarding in VMBackend, main code uses KubernetesBackend directly.
  • [ ] File follow-up epic to transition UI to use REST APIs

mook-as avatar Apr 07 '22 22:04 mook-as

Moved immutable configuration up to better align with other plans.

mook-as avatar May 11 '22 18:05 mook-as

FWIW, work has been ongoing in the mook-as/refactor branch (with various PRs already submitted from that branch).

mook-as avatar Aug 24 '22 18:08 mook-as

The refactoring has been complete.

mook-as avatar Nov 03 '22 18:11 mook-as