-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
make deploy is broken for kustomize v2.0.0 release #595
Comments
Also seeing this. A quick hack is to bring the Whether having the kustomize manifests in the top-level |
I've had a play with config directory structures over the past few days and arrived at the following, feeling like it's the cleanest I've found, keeping all the kustomize builds from
|
My suggestion:
Two main directories under config, one for API resources and the other for the manager. |
at cluster-api, we are using
please refer to https://github.com/kubernetes-sigs/cluster-api/blob/master/config/default/kustomization.yaml |
@Liujingfang1 Could you please help with it ? |
Agree with the change suggested by @figo
|
|
@Adirio your proposal works from kustomize point of view, but it will not work for cluster-api case, i am arguing that cluster-api is not a special case. in your design, rbac, crds, manager files generated by kube-builder stay within one kustomize folder, it can not be shared, but we have test, prod, staging environments that want to share the same rbac, crds, manager files. thats why i think |
That answers 3, but 1 and 2 still hold |
I believe the reason for the "default" directory is so that a project can maintain multiple different kustomize overlays. "default", "production", "debug", etc. that each allow for customizations based on a different environments while still maintaining the same bases and resources. At least that is how we are using that directory level within our projects. I would like to see that continue to exist moving forward. |
I took a look at the Makefile in a kubebuilder project. The CRDs are installed by
In this case, we don't need to add kustomization.yaml to crds/.
That folder is called |
For existing projects, please follow this instruction to migrate the config directory structure to the new structure, which works with kustomize 2.0.0
to
|
Thanks @Liujingfang1 for adding the instructions for migration. @Adirio Re:
Want to confirm what @alegacy and @Liujingfang1 said earlier that |
The latest version of kustomize does not allow paths outside of the current directory structure. Replaced these with kustomization.yaml files in each subfolder per kubernetes-sigs/kubebuilder#595
The latest version of kustomize does not allow paths outside of the current directory structure. Replaced these with kustomization.yaml files in each subfolder per kubernetes-sigs/kubebuilder#595
@Liujingfang1 in step 3, what is |
@itaysk Yes, thank you for catching it. I updated the steps. |
kustomize v2.0.0 requires that all paths other than bases have to terminate in same or subdirectory of the kustomization directory. So
kustomize build config/default
inmake deploy
fails becausekustomization.yaml
contains resource paths like../rbac/rbac_role.yaml
. According to kustomize v2.0.0,rbac
andmanager
folder should be underconfig/default
directory.The text was updated successfully, but these errors were encountered: