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

Add load_restrictor flag. #998

Merged
merged 1 commit into from
Apr 20, 2019

Conversation

monopole
Copy link
Contributor

@monopole monopole commented Apr 20, 2019

Reimpose the restriction removed in #995, but provide a flag to override:

kustomize build --load_restrictor none $dir

will allow loading of data files outside the kustomization root. The flag's default value is rootOnly, which prevents loading from outside the root.

If the kustomization target is remote (e.g. $dir is actually a github URL), the flag has no effect - loading is always restricted to the kustomization root for remote kustomizations.

Fixes #985
Fixes #937
Fixes #868
Fixes #851
Fixes #766
Related #759

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 20, 2019
@monopole monopole requested a review from Liujingfang1 April 20, 2019 00:27
@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 requested a review from droot April 20, 2019 00:27
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 20, 2019
@monopole monopole force-pushed the addLoadRestrictorFlag branch from 545e52f to b91d83d Compare April 20, 2019 00:30
@monopole monopole force-pushed the addLoadRestrictorFlag branch from b91d83d to 3b8c5ee Compare April 20, 2019 00:34
@monopole monopole merged commit aba9f7d into kubernetes-sigs:master Apr 20, 2019
@monopole monopole mentioned this pull request Apr 22, 2019
@monopole monopole deleted the addLoadRestrictorFlag branch April 23, 2019 01:46
@jcassee
Copy link
Contributor

jcassee commented Apr 24, 2019

Thanks a lot, @monopole. Together with plugins this restores my pre-2.0 usecase.

pohly added a commit to pohly/pmem-CSI that referenced this pull request May 2, 2019
This allows us to remove the workaround for patch files because
kubernetes-sigs/kustomize#998 added support
for loading patch files outside of the root.

While at it, this fixes two things:
- incorrect comment (Go 1.11 already had good enough module support)
- dependencies were to complicated and prevented rebuilding files
  when changing the kustomize version
pohly added a commit to pohly/pmem-CSI that referenced this pull request May 2, 2019
This allows us to remove the workaround for patch files because
kubernetes-sigs/kustomize#998 added support
for loading patch files outside of the root.

While at it, this fixes two things:
- incorrect comment (Go 1.11 already had good enough module support)
- dependencies were to complicated and prevented rebuilding files
  when changing the kustomize version
pohly added a commit to pohly/pmem-CSI that referenced this pull request May 3, 2019
This allows us to remove the workaround for patch files because
kubernetes-sigs/kustomize#998 added support
for loading patch files outside of the root.

While at it, this fixes two things:
- incorrect comment (Go 1.11 already had good enough module support)
- dependencies were to complicated and prevented rebuilding files
  when changing the kustomize version
chuyd pushed a commit to chuyd/pmem-CSI that referenced this pull request May 16, 2019
This allows us to remove the workaround for patch files because
kubernetes-sigs/kustomize#998 added support
for loading patch files outside of the root.

While at it, this fixes two things:
- incorrect comment (Go 1.11 already had good enough module support)
- dependencies were to complicated and prevented rebuilding files
  when changing the kustomize version
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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
3 participants