Merge pull request #269 from fluxcd/local-helm-chart-dep-fix

Assume local dependency without Helm repository
This commit is contained in:
Hidde Beydals 2021-01-28 12:41:38 +01:00 committed by GitHub
commit 7012579b3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -537,7 +537,7 @@ func (r *HelmChartReconciler) reconcileFromTarballArtifact(ctx context.Context,
}
// 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{
Dependency: dep,
Repository: nil,

View File

@ -156,7 +156,7 @@ func (dm *DependencyManager) secureLocalChartPath(dep *DependencyWithRepository)
if err != nil {
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 securejoin.SecureJoin(dm.WorkingDir, filepath.Join(dm.ChartPath, localUrl.Host, localUrl.Path))