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

Drop go-getter use. #3586

Merged
merged 2 commits into from
Feb 12, 2021
Merged

Conversation

monopole
Copy link
Contributor

@monopole monopole commented Feb 12, 2021

Fix #3578

Only the first commit (d564df5) has manual changes, the rest is due to go tidy etc. Lots of deps are dropped.

The build command's help had to be changed since it mentioned gogettter; took the opportunity to make the cobra command object more reusable, so we have the option of using it directly in kubectl.

ALLOW_MODULE_SPAN

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 12, 2021
@monopole monopole requested review from natasha41575 and removed request for justinsb and mengqiy February 12, 2021 00:41
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: monopole

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 12, 2021
@natasha41575
Copy link
Contributor

natasha41575 commented Feb 12, 2021

so kustomize is no longer supporting building from remote repos? just checking that I understand the purpose of this PR

@monopole
Copy link
Contributor Author

It still supports URLs like

kustomize build https://github.com/kubernetes-sigs/kustomize.git/examples/helloWorld?ref=v1.0.6

@Shell32-Natsu
Copy link
Contributor

so kustomize is no longer supporting building from remote repos? just checking that I understand the purpose of this PR

go-getter is the first method kustomize tries to get the remote resources. After removing it the secondary method (git cloner) will be the primary one. It may break some users' remote resources and probably reduce performance but we have to do it since license issue and massive dependencies.

@Shell32-Natsu
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 12, 2021
@k8s-ci-robot k8s-ci-robot merged commit 2d7b6a5 into kubernetes-sigs:master Feb 12, 2021
@monopole
Copy link
Contributor Author

Under the hood, it uses git clone in a subprocess.

The argument to 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The resource loader requires too many deps.
4 participants