Replies: 1 comment
-
Using the following markers will prevent pruning and enable schema-less validation, which might solve the issue: ```go By applying these markers, you inform Kubernetes to retain all fields (even those it doesn't recognize) and not to enforce a schema on this particular field. Ensure to regenerate the CRD and apply it after adding these markers. For further info see: https://book.kubebuilder.io/reference/markers I am closing this one however, if you need to help about this one feel free to reopen |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Environment
Kubectl Version
Kubernetes Version (Kind Cluster)
Kubebuilder Version
Os
I use kubebuilder to define my own
CRD
like below, and it containsVolumeClaimTemplates
filed which the type is[]coreV1.PersistentVolumeClaim
But when I apply the CR like the below, I found that the
metadata
filed is emptyHere is the yaml which get from the k8s ectd, it cound be found that the metadata of the
volumeClaimTemplates
is empty.Does anyone know why?
And when I mark the volumeclaimtemplate field with the below comment
metada
can be decoed correctlyBeta Was this translation helpful? Give feedback.
All reactions