Assume local dependency without Helm repository
This commit fixes a bug where local chart dependencies would not be detected correctly due to the absence of a repository URL. Signed-off-by: Hidde Beydals <hello@hidde.co>
This commit is contained in:
parent
83da57d7d9
commit
3cdc897236
|
@ -537,7 +537,7 @@ func (r *HelmChartReconciler) reconcileFromTarballArtifact(ctx context.Context,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Continue loop if file scheme detected
|
// Continue loop if file scheme detected
|
||||||
if strings.HasPrefix(dep.Repository, "file://") {
|
if dep.Repository == "" || strings.HasPrefix(dep.Repository, "file://") {
|
||||||
dwr = append(dwr, &helm.DependencyWithRepository{
|
dwr = append(dwr, &helm.DependencyWithRepository{
|
||||||
Dependency: dep,
|
Dependency: dep,
|
||||||
Repository: nil,
|
Repository: nil,
|
||||||
|
|
|
@ -156,7 +156,7 @@ func (dm *DependencyManager) secureLocalChartPath(dep *DependencyWithRepository)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("failed to parse alleged local chart reference: %w", err)
|
return "", fmt.Errorf("failed to parse alleged local chart reference: %w", err)
|
||||||
}
|
}
|
||||||
if localUrl.Scheme != "file" {
|
if localUrl.Scheme != "" && localUrl.Scheme != "file" {
|
||||||
return "", fmt.Errorf("'%s' is not a local chart reference", dep.Dependency.Repository)
|
return "", fmt.Errorf("'%s' is not a local chart reference", dep.Dependency.Repository)
|
||||||
}
|
}
|
||||||
return securejoin.SecureJoin(dm.WorkingDir, filepath.Join(dm.ChartPath, localUrl.Host, localUrl.Path))
|
return securejoin.SecureJoin(dm.WorkingDir, filepath.Join(dm.ChartPath, localUrl.Host, localUrl.Path))
|
||||||
|
|
Loading…
Reference in New Issue