Localize fields: openapi, configurations, crds (#4907)

* Localize openapi, configurations, crds

* Add integration test

* Move krusty test

* Address code review feedback
This commit is contained in:
Anna Song
2022-12-22 15:07:26 -05:00
committed by GitHub
parent a1bfab382a
commit de6162625f
5 changed files with 407 additions and 166 deletions

View File

@@ -92,7 +92,7 @@ func (ll *Loader) Load(path string) ([]byte, error) {
if filepath.IsAbs(path) {
return nil, errors.Errorf("absolute paths not yet supported in alpha: file path %q is absolute", path)
}
if ll.local {
if !loader.IsRemoteFile(path) && ll.local {
cleanPath := cleanFilePath(ll.fSys, filesys.ConfirmedDir(ll.Root()), path)
cleanAbs := filepath.Join(ll.Root(), cleanPath)
dir := filesys.ConfirmedDir(filepath.Dir(cleanAbs))