Remove use of chartutil.ProcessDependencies
It looks like the use of chartutil.ProcessDependencies in the HelmChart Controller was not correct, this method seems to be used in Helm only during install/upgrade. The intention was to load the dependencies but this seems to not be needed as it's already done through the loaders (loader.Load). The use of this method caused a regression where Chart.yaml files would be overwritten and registered subcharts that had aliases would be renamed using the alias name. While this is an expected behaviour of chartutil.ProcessDependencies it is not what the controller should do to the chart during (re)packaging. Signed-off-by: Aurel Canciu <aurelcanciu@gmail.com>
This commit is contained in:
parent
f60f7591e1
commit
946d1e6ac0
|
@ -446,12 +446,6 @@ func (r *HelmChartReconciler) reconcileFromTarballArtifact(ctx context.Context,
|
||||||
isDir := chartFileInfo.IsDir()
|
isDir := chartFileInfo.IsDir()
|
||||||
switch {
|
switch {
|
||||||
case isDir:
|
case isDir:
|
||||||
// Load dependencies
|
|
||||||
if err = chartutil.ProcessDependencies(helmChart, helmChart.Values); err != nil {
|
|
||||||
err = fmt.Errorf("failed to process chart dependencies: %w", err)
|
|
||||||
return sourcev1.HelmChartNotReady(chart, sourcev1.StorageOperationFailedReason, err.Error()), err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Determine chart dependencies
|
// Determine chart dependencies
|
||||||
deps := helmChart.Dependencies()
|
deps := helmChart.Dependencies()
|
||||||
reqs := helmChart.Metadata.Dependencies
|
reqs := helmChart.Metadata.Dependencies
|
||||||
|
|
|
@ -24,6 +24,10 @@ dependencies:
|
||||||
- name: helmchart
|
- name: helmchart
|
||||||
version: "0.1.0"
|
version: "0.1.0"
|
||||||
repository: "file://../helmchart"
|
repository: "file://../helmchart"
|
||||||
|
- name: helmchart
|
||||||
|
alias: aliased
|
||||||
|
version: "0.1.0"
|
||||||
|
repository: "file://../helmchart"
|
||||||
- name: grafana
|
- name: grafana
|
||||||
version: ">=5.7.0"
|
version: ">=5.7.0"
|
||||||
repository: "https://grafana.github.io/helm-charts"
|
repository: "https://grafana.github.io/helm-charts"
|
||||||
|
|
Loading…
Reference in New Issue