Skip to content

Commit

Permalink
fix: issue where kustomization files are empty
Browse files Browse the repository at this point in the history
Signed-off-by: Allen Conlon <[email protected]>
  • Loading branch information
a1994sc committed Oct 12, 2024
1 parent ca6a4ca commit d56260e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pkg/packager/prepare.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ func (p *Packager) findImages(ctx context.Context) (map[string][]string, error)
for idx, k := range manifest.Kustomizations {
// Generate manifests from kustomizations and place in the package
kname := fmt.Sprintf("kustomization-%s-%d.yaml", manifest.Name, idx)
destination := filepath.Join(componentPaths.Manifests, kname)
// Use the temp folder because "helpers.CreatePathAndCopy" will with the same path will result in the file being empty
destination := filepath.Join(componentPaths.Temp, kname)
if err := kustomize.Build(k, destination, manifest.KustomizeAllowAnyDirectory); err != nil {
return nil, fmt.Errorf("unable to build the kustomization for %s: %w", k, err)
}
Expand Down

0 comments on commit d56260e

Please sign in to comment.