Skip to content

Commit

Permalink
Merge pull request #4605 from m-Bilal/fix-4559
Browse files Browse the repository at this point in the history
Fix kustomize 4.5.3+ breaking remote resources (4559)
  • Loading branch information
k8s-ci-robot committed May 2, 2022
2 parents 9d5491c + 66e4e15 commit 233b6ad
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions api/internal/target/kusttarget.go
Expand Up @@ -411,11 +411,11 @@ func (kt *KustTarget) accumulateResources(
if errors.Is(errF, load.ErrorHTTP) {
return nil, errF
}
if kusterr.IsMalformedYAMLError(errF) { // Some error occurred while tyring to decode YAML file
return nil, errF
}
ldr, err := kt.ldr.New(path)
if err != nil {
if kusterr.IsMalformedYAMLError(errF) { // Some error occurred while tyring to decode YAML file
return nil, errF
}
return nil, errors.Wrapf(
err, "accumulation err='%s'", errF.Error())
}
Expand All @@ -430,6 +430,9 @@ func (kt *KustTarget) accumulateResources(
ra, err = kt.accumulateDirectory(ra, ldr, false)
}
if err != nil {
if kusterr.IsMalformedYAMLError(errF) { // Some error occurred while tyring to decode YAML file
return nil, errF
}
return nil, errors.Wrapf(
err, "accumulation err='%s'", errF.Error())
}
Expand Down

0 comments on commit 233b6ad

Please sign in to comment.