Properly escape outer loop for present dependency

To prevent dependencies that are already present locally to be included.

Signed-off-by: Thomas Runyon <runyontr@gmail.com>
This commit is contained in:
Thomas Runyon 2021-02-02 09:14:47 -05:00 committed by Hidde Beydals
parent eca08f87c2
commit 8428054575
1 changed files with 5 additions and 1 deletions

View File

@ -539,11 +539,15 @@ func (r *HelmChartReconciler) reconcileFromTarballArtifact(ctx context.Context,
var dwr []*helm.DependencyWithRepository
for _, dep := range reqs {
// Exclude existing dependencies
found := false
for _, existing := range deps {
if existing.Name() == dep.Name {
continue
found = true
}
}
if found {
continue
}
// Continue loop if file scheme detected
if dep.Repository == "" || strings.HasPrefix(dep.Repository, "file://") {