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

CRD embedded ObjectMeta preservation during version conversion #1531

Closed
champak opened this issue May 28, 2020 · 1 comment
Closed

CRD embedded ObjectMeta preservation during version conversion #1531

champak opened this issue May 28, 2020 · 1 comment

Comments

@champak
Copy link

champak commented May 28, 2020

I ran into an issue with converting CRDs between versions with kubebuilder 2.2.0. This CRD has embedded native types in the spec like services, pods etc. First I got complaints about "preserveUnknownFields" : spec.conversion.strategy: Invalid value: "Webhook": must be None if spec.preserveUnknownFields is true. I got around that with setting "preserveUnknownFields" to false in the webhook patch that enables the conversion webhook. With the workaround I can get deployed but find that when I am converting in the <>ConvertTo functions the ObjectMeta info for the native objects embedded in my CRD spec are MIA ! The ObjectMeta info for the CRD itself shows up OK. I suspect preserveUnknownFields=false somehow gets in the way of the ObjectMeta info getting propagated correctly. Attributes other than the ObjectMeta info seem to show up OK.

The controller-tools are at v0.2.4; I could not locate an issue that describes this exact issue on either controller-tools or this repo. Thanks for any insights, workarounds !

@champak
Copy link
Author

champak commented Jun 29, 2020

This issue is tracked at kubernetes-sigs/controller-tools#448; closing for kubebuilder

@champak champak closed this as completed Jun 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant