-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Incorrect CRD generated after adding webhook/ca injection patches to kustomize #1633
Comments
Hi @robherley, Could you please check it with the master branch and the v3-alpha plugin? E.g:
Let's see it is not solved with the latest version and plugin. Also, if not could you please clarify what is the value scaffolded as you did and what is the value expected by you? |
Here's the steps I followed for the master branch (3c4eb4f):
That yaml has the correct spec.subresources.status for the CustomResourceDefinition: apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
...
spec:
...
subresources:
status: {} # this is correct
... But if I uncomment the patches for the webhooks in patchesStrategicMerge:
- patches/webhook_in_foobars.yaml
- patches/cainjection_in_foobars.yaml And regenerate the manifests:
It's missing the status subresource: apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
...
spec:
...
subresources: {} # missing status
... I've attached |
This might be related: #1655 |
Hi @robherley, Are you using the kustomize version defined in the Makefile or other version? If yes, we might be able to close this one with #1735? Could you help on the review of the PR? Also, we have an issue to upgrade the kustomize version and fix its issues see #1657. Would you like to help on it? |
Hi @camilamacedo86, I just ran my tests again with the latest commit on master (36124ae) and used the kustomize version specified in the Makefile ( |
When adding the patches for webhooks/cert manager, the subresources field for the CRD is empty and missing the status field.
Steps to reproduce:
v1.14.5
kubebuilder version
) and scaffolding version (check yourPROJECT
file)kubebuilder: v2.3.1 and scaffolding: v2
go.mod
file)v0.5.0
kubectl version
against your API server)client: v1.18.3 and server: v1.17.1
/kind bug
The text was updated successfully, but these errors were encountered: