Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The resource loader requires too many deps. #3578

Closed
monopole opened this issue Feb 10, 2021 · 0 comments · Fixed by #3586
Closed

The resource loader requires too many deps. #3578

monopole opened this issue Feb 10, 2021 · 0 comments · Fixed by #3586
Assignees

Comments

@monopole
Copy link
Contributor

monopole commented Feb 10, 2021

The resource loader was expanded (#2278) to use a fork of hashicorp/go-getter.

This getter conveniently allows fetching resource yaml from a wide variety of sources.

however

  • the go-getter's license is not on the CNCF approved LICENSE list.
  • using it explodes deps, because it wraps N adapters around N independent fetchers (and N grows).

This feature has to be quickly dropped, because it blocks #1500.

Users that rely on special URL's in resource fields will have to use v3.10.0 or earlier, or write a plugin that accepts such URLs, or wait for someone else to do so.

kustomize build, or any entry in the resources, generators, transormers, components or validators, is parsed into a RepoSpec to separate the url part from the directory part.

The URL is passed to a subprocess that runs git clone to pull into a temp dir. Then the YAML is pulled from the appropriate subdir of that temp dir. So kustomize still honor's whatever git clone honors.

Digging in to history:

kustomize needs a deny list for go.mod files, and the presubmit should check go.mod changes against this deny list.

The only way hashicorp go-getter can be reintegrated as either

  • a plugin (simplest from a programming pov, but user now needs docker to run it)
  • a top level Go module that's a sibling to /api that the kustomize binary can depend on, but that kubectl won't depend on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant