Skip to content

Use Chart values instead of object patches

Hossein Pursultani requested to merge 72-minimize-object-helper-patches into master

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

This MR breaks the replacement tests with explicit panic call due to outdated code. For the latest replacement test see https://gitlab.com/gitlab-org/gl-openshift/gitlab-operator/-/jobs/1108638716

This MR replaces explicit patches of templated object (implemented in object_helpers.go) with as many Chart values as possible. This reduces the number of manual patches and centeralizes the configuration of the instance.

object_helpers.go is broken down into component-specific files. Also CustomResourceAdapter and SystemBuildOptions have been refactored. The refactoring created a chain of changes. Most notably, the call to SystemBuildOptions from deprecated generators will panic. Basically any SystemBuildOptions(nil) shouldn't have been called. This will effectively breaks the replacement tests.

Closes https://gitlab.com/gitlab-org/gl-openshift/gitlab-operator/-/issues/64

Edited by Mitchell Nielsen

Merge request reports