Cleanup and refactor the controller after replacing the majority of generator functions
After replacing all the major generator functions with Helm template, we need to clean up and refactor the code. Here is a list of proposed changes (without priority):
-
Remove the deprecated generator functions and their dependencies, including assets in /hack
and replacement tests. -
Replace explicit patches of templated object (implemented in object_helpers.go
) with as many Chart values as possible. Reduce the number of manual patches, including custom labels where applicable. -
Tune Chart values for OpenShift deployment, e.g. remove TLS certificate generation. -
Refactor GitLab controller to use CR adapter and remove the redundant code. -
Use other Secrets that are generated with shared secrets Job, e.g. PostgreSQL. -
Move helm
package to the root of the project -
Consolidate the early PoC code, e.g. generator functions, backup, runner, etc., in one package. This is to contain the previous work and simplify the future improvements and replacements. (to be separated from this issue - can be pushed out to GA) -
Add more environment variables to configure the controller. -
Use the same package for tests, e.g. instead of helm_test
usehelm
package. -
Unify logging practice, esp. in Reconcile loop, to have a more verbose output. (to be separated from this issue - can be pushed out to GA)
There are a number of follow-up issues that are related and can be addressed here as well, including #69 (closed), #64 (closed) and #63 (closed).
NOTE: We need to create specific issues and MR for each action item here.
Edited by Hossein Pursultani