Uploaded image for project: 'OpenShift Workloads'
  1. OpenShift Workloads
  2. WRKLDS-487

Split the route controllers out from OCM

XMLWordPrintable

    • Workloads - 4.12, Workloads Sprint 225, Workloads Sprint 226, Workloads Sprint 227

      • nested locking logic (add new lock for route controllers today)
      • backport nested locking logic to 4.11
      • create route-controller-manager with a minimal subset of exactly what needs to move. keep history as I did before.
      • update operator (ideally ingress, but for expediency probably openshift-controller-manager) to install route-controller-manager
      • hard to move to ingress operator since it is not build on openshift/library-go but on Operator SDK
      • delete route controllers from openshift-controller-manager:  in 4.12 a new repo will be created (route-controller-manager) for the ingress and ingress-ip controllers. This will be managed by OCMO

      API side:

      • admission of Route is going to be moved as an admission plugin to kube-apiserver as a carry in o/k
      • API will still be served by openshift-apiserver
      • Route CRD will be created in microshift project and then eventually moved to openshift/api where it will be generated from the type. It will be then consumed by microshift

      Leases timeline:

      in 4.11.0 we have

      1. route-controllers run here behind lease/openshift-controller-manager

      in 4.11.z I think we need

      1. route-controllers run here behind lease/openshift-controller-manager AND lease/route-controller-manager. This needed so that when upgrading to 4.11.z, we do not end up with a 4.11.0 route-controllers running AND a 4.11.z route-controllers running. The PR as it currently stands would allow the two to run alongside each other

      in 4.12, I think we need

      1. openshift-controller-manager runs behind lease/openshift-controller-manager
      2. route-controller-manager runs behind lease/route-controller-manager

      Steps recommended by David:

      1. Create the command you want. In this case it would be `route-controller`
      2. Start separating the new command into dedicated directories, this let’s you later delete all the old content you don’t need.
        • while moving a code into a separate repo, some dependency moved into library-go
      3. Complete copy of a repo (cp recursive workspaces/openshift-controller-manager/src/github.com/openshift//openshift-controller-manager, workspaces/route-controller-manager/src/github.com/openshift//openshift-controller-manager) and delete all things no longer needed while making sure the command still builds
        • To verify this was done correctly, we diff everything under github.com/openshift/openshift-controller-manager/pkg/route, pkg/cmd/controller/route, and cmd/route-controller-manager and expect a zero-diff on the packages remaining
      4. Then run filter branch command, this fixes the git history, so we can keep it.
      5. Create repo openshift/route-controller-manager – (this can be done now)
      6. Use the resulting repo as the starting repo and push into the new github repo
        • For this, you probably need to send deads a zip of the repo
      7. At this point, we have a route-controller-manager with code that does not build, because all the code thinks it is in github.com/openshift/openshift-controller-manager, but it needs to be in openshift/route-controller-manager
      8. Now open a PR to openshift/route-controller-manager to rename package to be under github.com/openshift/route-controller-manager
      9. At this point we should build and you need to get images created for this new repo. There will be ART steps and test platform steps. Call the image openshift-route-controller-manager
        • Get all the correct test jobs wired: Verify, Image, Parallel, Serial, Upgrade
      10. Now switch the deployment created in the steps below to use the new image.
      11. Update microshift to depend on the route-controller-manager repo and remove the openshift-controller-manager dependency
      12. Now delete the route-controller-manager packages from openshift-controller-manager repo
      13. Now you can refactor and fix whatever debt you have incurred. Jan will say how long you can spend polishing.

      In parallel, after step 1

      1. Open a cluster-openshift-controller-manager-operator PR that adds management for a new route-controller-manager deployment.
        • This will allow you to practice running as a separate binary
        • Don’t merge until the picks are in 4.11.1
      2. Remove the part where openshift-controller-manager starts the route-controllers, this part: https://github.com/openshift/openshift-controller-manager/blob/1e9af455d1594c5b9831eec5814475345e75b1a1/pkg/cmd/openshift-controller-manager/controller_manager.go#L157-L162

          There are no Sub-Tasks for this issue.

              fkrepins@redhat.com Filip Krepinsky
              fkrepins@redhat.com Filip Krepinsky
              ying zhou ying zhou
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: