Skip to content

Cleanup and refactor the controller after replacing the generator functions

Hossein Pursultani requested to merge 72-remove-legacy-code into master

NOTE: This is part of refactoring that is listed in #72 (closed)

This MR rolls out the following changes:

  • Remove replacement tests, i.e. controllers/gitlab/replace_*_test.go.
  • Remove DEPRECATED generator functions and the files that contained them , e.g. controllers/gitlab/configmaps.go, along with unused utilities from controllers/gitlab package.
  • Rename controllers/gitlab/xyz_helpers.go to controllers/gitlab/xyz.go, e.g. gitaly_helpers.go to gitaly.go.
  • Merge controllers/helpers package into controllers/gitlab.
  • Move any remaining generator function, e.g. Minio* or BucketCreationJob, and their dependencies and required utilities to controllers/internal package.
  • Move utilities from controllers/utils to controllers/internal and removed unused code from controllers/utils.
  • Merge controller helpers, controllers/helpers.go, with the controller.
  • Remove unused GitLab assets for generator functions.
  • Updates RBAC and bundled CRD manifest to reflect the new changes in !110 (merged) and !118 (merged).

As a result of these changes:

  • GitLab code is consolidated in controllers/gitlab package.
  • The initial MVP code is consolidated in controllers/internal package.
  • controllers/gitlab does not depend on any other MVP package, including controllers/internal. This will simplify the future refactoring.
  • controllers/internal still depends on some of the static assets in `hack
  • GitLab controller relies on both controllers/gitlab and controllers/internal.
  • Backup and Runner controllers and their dependencies are not changed.

Closes #72 (closed)

Edited by Hossein Pursultani

Merge request reports