-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Support hashicorp/go-getter format http url as remote base #923
Comments
Please note that we don't plan to use |
I think I saw it in code somewhere. Is it already removed? It does not have to be |
+1. |
I'm a bit confused. The documentation says that kustomize/docs/kustomization.yaml Lines 130 to 133 in 177297c
Is that incorrect and the actual implementation expects something else, or only supports a subset of the hashicorp implementation? |
I saw some recent update about plugin (see f6e01cf ) Is it feasible to exec go-getter as a plugin? It has a standalone executable. (see https://github.com/hashicorp/go-getter#installation-and-usage). |
@yujunz You could write a generator plugin which executes go-getter. This plugin can fetch the files or directories with only raw K8s resources. The generator plugins assumes the output is a list of K8s resources. If the remote URL doesn't have a kustomization.yaml and only contains raw K8s resources, the plugin can just load them and write them into a resmap. If the remote URL contains a kustomization.yaml, the plugin has to run a |
Is plugin limited to generator? Can we also extend loader with external plugin? |
Currently plugins are either generators or transformers, loaders are not included. If you have any thoughts, feel free to write a KEP for it. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
A simple plugin for go-getter: https://github.com/kustless/kustomize-plugins/tree/master/gogetter |
/remove-lifecycle stale |
So just to be clear, the comment that @pohly referenced, and the remote build example, are not accurate currently? |
What the examples says is true.
What is also true is that only a subset of all hashicorp/go-getter URL formats are supported. |
Thanks for clarifying. For other people who are searching: I was asking this because I was trying to use a remote resource or base from a private repository over ssh. The correct format turned out to be: bases:
- ssh://github.com/username/repo_name.git//path/to/dir?ref=branch_name |
And which subset is that? |
Only some of the git repo spec See https://github.com/kubernetes-sigs/kustomize/blob/master/pkg/git/repospec_test.go |
@yujunz Would you like to add this generator plugin https://github.com/kustless/kustomize-plugins/tree/master/gogetter as an example generator in Kustomize repo and write some docs for it? |
Original requirement from #894 .
Currently only local files and git is supported in kustomzie. When the bases is stored in a large mono-repo, let's say giga bytes, it is not feasible to clone the whole repository to fetch just one base.
The following features in
hashicorp/go-getter
satisfies such requirements perfectly, i.e.The text was updated successfully, but these errors were encountered: