Replace static Spec of GitLab CRD with dynamic Chart values
This issue is an outcome of the investigation conducted in #42 (closed).
Currently, the Operator-managed GitLab deployment is configured with the structured Spec of GitLab CRD. This structure is static and currently limited to a handful of parameters.
It is common practice for CRDs to have a structured and well-defined Spec, which is partially driven by Go language and Operator SDK. But for GitLab CRD we can put forward a convincing case for a dynamic and open structured Spec.
Firstly, the number of parameters for configuring GitLab is enormous. Representing all of the parameters as Go structures is a major undertaking and certainly a maintenance nightmare. Secondly, considering we are leveraging GitLab Chart, we will have to either replicate the values that Chart can consume or create a mapping from Spec to Chart values. Either way, it is going to be erroneous and cumbersome. Using open structured Spec allows us to use Chart values. Apart from addressing the previous problems, it has the benefit of configuring the Operator-managed GitLab deployment with the familiar and well-documented Helm Chart.
What we want to do is to:
- Remove the
GitLabSpec
structure and its sub-structures. - Replace
GitLabSpec
with an open structure, such asmap[string]interface{}
, that can be unmarshalled from JSON. - Wrap this open structure in "helm.Values", which allows dot-notation access to the nested values and their manipulation.