Check if specified Chart version is supported, and print available versions if not
What
Adds a method to the adapter for checking if the specified chart
version is supported. If so, it returns true
and a nil error.
If not, it returns false
and an error message specifying that
the version is not supported, and lists the available versions.
Why
If someone deploys a GitLab manifest/CR with an incorrect Chart version specified, the error isn't particularly helpful:
"Configuration error detected: path \"/charts/gitlab-x.y.z.tgz\" not found"
This MR make it more clear that a proper version was not selected, and provides the list of proper versions for corrective action.
Testing
- Tests added in codebase
- To test yourself, submit a GitLab CR with
spec.chart.version=1.2.3
or similar (anything that isn't listed in CHART_VERSIONS) and watch the Operator logs
Related to #418 (closed)
Edited by Mitchell Nielsen