Skip to content

Commit

Permalink
handle source.spec.helm.ignoreMissingValuesFiles = true (#303)
Browse files Browse the repository at this point in the history
sl1pm4t authored Nov 8, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent dbd9d1f commit 0598e32
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/argo_client/manifests.go
Original file line number Diff line number Diff line change
@@ -334,7 +334,12 @@ func packageApp(ctx context.Context, source v1alpha1.ApplicationSource, refs []v
src := filepath.Join(refRepo.Directory, refPath)
dst := filepath.Join(tempDir, refPath)
if err = copyFile(src, dst); err != nil {
return "", errors.Wrapf(err, "failed to copy referenced value file: %q", valueFile)
// handle source.spec.helm.ignoreMissingValues = true
if errors.Is(err, os.ErrNotExist) && source.Helm.IgnoreMissingValueFiles {
log.Debug().Str("valueFile", valueFile).Msg("ignore missing values file, because source.Helm.IgnoreMissingValueFiles is true")
} else {
return "", errors.Wrapf(err, "failed to copy referenced value file: %q", valueFile)
}
}

relPath, err := filepath.Rel(tempAppDir, dst)

0 comments on commit 0598e32

Please sign in to comment.