You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While this fixes the generation problem, the generated CRD looks like this (for the map example above, I removed the description to improve readability):
This means that the map values must be objects, despite the AnyJSON struct being able to hold arbitrary JSON, thus preventing the CRD from working as desired. I would like to simply have no type definition within the additionalProperties struct here.
I have not found a solution for this problem except for adding the +kubebuilder:validation:Schemaless marker to any field that uses the AnyJSON struct. This is highly annoying and prone to causing problems when adding new types.
Since the proposal to add multi-types already got denied (see #735), would it be possible to enable adding the kubebuilder:validation:Schemaless marker to a type? This way, I could add the marker once to the type definition and would not have to add it every single time the type is used.
The text was updated successfully, but these errors were encountered:
We have the the following custom struct which wraps
json.RawMessage
:It is used both directly and also as value of a
map
:Without any markers, the result is an error message during generation:
So I added these markers:
While this fixes the generation problem, the generated CRD looks like this (for the map example above, I removed the
description
to improve readability):This means that the map values must be objects, despite the
AnyJSON
struct being able to hold arbitrary JSON, thus preventing the CRD from working as desired. I would like to simply have notype
definition within theadditionalProperties
struct here.I have not found a solution for this problem except for adding the
+kubebuilder:validation:Schemaless
marker to any field that uses theAnyJSON
struct. This is highly annoying and prone to causing problems when adding new types.Since the proposal to add multi-types already got denied (see #735), would it be possible to enable adding the
kubebuilder:validation:Schemaless
marker to a type? This way, I could add the marker once to the type definition and would not have to add it every single time the type is used.The text was updated successfully, but these errors were encountered: