Consistency between charts/ directory and requirements.yaml file
pamiel opened this issue · 0 comments
pamiel commented
There are several cases where the processing of Spray could be stopped because the content of the charts/
directory in not in line with the content of the requirements.yam
file.
In particular, the following use cases are very difficult to bugfix and it would be good that Spray could perform an automatic verification:
- Several charts in the
charts/
directory are matching a single entry of therequirements.yaml
file => we don't know which one is executed... - Chart present in the
charts/
directory is not matching the version provided in therequirements.yaml
file => something is executed, but we don't know which chart is used... - a Chart exists in the
charts/
directory but is not declared in therequirements.yaml
file => as Spray calls Helm for each individual sub-chart, this additional chart is executed several times, generating duplicates objects
A check could be done by Spray using the helm dep list
utility, but unfortunately this tool is not implemented properly:
- It does not make the difference between a Chart named
my-chart
and another one namedmy-chart-second
and returns a wrong "too many matches": https://github.com/helm/helm/blob/release-2.15/cmd/helm/dependency.go#L157 - It does not manage the Aliasing of charts in the
requirements.yaml
and returns a wrong "misnamed": https://github.com/helm/helm/blob/release-2.15/cmd/helm/dependency.go#L170 - It handles the missing charts in the
requirements.yaml
file as a warning instead of an error: https://github.com/helm/helm/blob/release-2.15/cmd/helm/dependency.go#L242
Something inspired from this source code could be integrated in Spray...