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

kubebuilder init creates structure incompatible with kustomize #654

Closed
danielorf opened this issue Mar 30, 2019 · 3 comments
Closed

kubebuilder init creates structure incompatible with kustomize #654

danielorf opened this issue Mar 30, 2019 · 3 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@danielorf
Copy link

When running kubebuilder init, a project structure is created which places the kustomization.yaml file in the 'config/default' folder which refers to other yaml files in 'config/rbac' and 'config/manager'. This is now a problem because in kustomize v2, kustomization.yaml can only refer to files in the same directory or in subdirectories (see more details here).

This problem cropped up when working through the tutorial and running the following command: make deploy. This resulted in the following error:

Error: rawResources failed to read Resources: Load from path /rbac/rbac_role.yaml failed: security; file '/rbac/rbac_role.yaml' is not in or below '/Users/dorf/go/src/dorf/config/default'

error: no objects passed to apply

I temporarily resolved it by moving 'config/rbac' and 'config/manager' to 'config/default' and changing the paths in kustomization.yaml to refer to the new location (e.g. ./rbac/rbac_role.yaml instead of ../rbac/rbac_role.yaml).

@DirectXMan12
Copy link
Contributor

cc @mengqiy presumably the new kustomize structure (#644) fixes this?

/kind bug
/priority important-soon

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Apr 8, 2019
@mengqiy
Copy link
Member

mengqiy commented Apr 9, 2019

This issue should already be fixed on HEAD by #614.

barney-s added a commit to barney-s/airflow-operator that referenced this issue May 22, 2019
When we regenerate the project with newer kubebuilder it will be resolved with newer manifests.
Till then this is the fix.
kubernetes-sigs/kubebuilder#654
@DirectXMan12
Copy link
Contributor

closing as per the referenced issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

4 participants