-
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
Invalid Kustomize generation #3425
Comments
We need to check the kustomize documentation and see what is missing to get it fixed. |
I think we are just missing a key in the patches array elements. It should look like this, I think: patches:
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
# patches here are for enabling the conversion webhook for each CRD
- path: patches/webhook_in_cronjobs.yaml
#+kubebuilder:scaffold:crdkustomizewebhookpatch
# [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix.
# patches here are for enabling the CA injection for each CRD
- path: patches/cainjection_in_cronjobs.yaml
#+kubebuilder:scaffold:crdkustomizecainjectionpatch |
Sorry @camilamacedo86 I was unaware of the issue and now looks like @mjlshen have already done a great work. Thank you for letting me know. I will be careful from next time 😄 . |
Hi @lauchokyip and @mjlshen, I am unable to reproduce this issue with the changes in the master branch. By looking at the steps you might did not uncomment all that is required.
|
@camilamacedo86 I can reproduce it starting with your steps kubebuilder init
kubebuilder create api --group batch --version v1 --kind CronJob
kubebuilder create webhook --group batch --version v1 --kind CronJob --conversion and then crucially here, uncommenting all the pieces you pointed out in The thing is, uncommenting in
I think the e2e test we added doesn't try to uncomment these |
/assign |
What broke? What's expected?
This PR (#3374) breaks the kustomization files generated. Had to revert back to
patchesStrategicMerge
To reproduce:
1)
mkdir testing cd testing kubebuilder init --domain tutorial.kubebuilder.io --repo tutorial.kubebuilder.io/project kubebuilder create api --group batch --version v1 --kind CronJob kubebuilder create webhook --group batch --version v1 --kind CronJob --conversion make manifests
/config/crd/kustomization.yaml
and uncommentkustomize
against itReproducing this issue
No response
KubeBuilder (CLI) Version
Version: main.version{KubeBuilderVersion:"v3.10.0-57-g959952de-dirty", KubernetesVendor:"unknown", GitCommit:"959952decffecb9a35bb843e706849586883360c", BuildDate:"2023-05-16T02:27:25Z", GoOs:"linux", GoArch:"amd64"}
PROJECT version
No response
Plugin versions
No response
Other versions
No response
Extra Labels
No response
The text was updated successfully, but these errors were encountered: