Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeserializeFromMetadata ¶ added in v0.39.0
func DeserializeFromMetadata(meta *metav1.ObjectMeta, to interface{}, key string) error
DeserializeFromMetadata takes the value of the input key from the metadata's annotations, deserializes it into "to", and removes the key from the metadata's annotations. Returns nil if the key is not present in the annotations.
func SerializeToMetadata ¶ added in v0.39.0
func SerializeToMetadata(meta *metav1.ObjectMeta, field interface{}, key string) error
SerializeToMetadata serializes the input field and adds it as an annotation to the metadata under the input key.
func ValidateEnabledAPIFields ¶
func ValidateEnabledAPIFields(ctx context.Context, featureName string, wantVersion string) *apis.FieldError
ValidateEnabledAPIFields checks that the enable-api-fields feature gate is set to a version at most as stable as wantVersion, if not, returns an error stating which feature is dependent on the version and what the current version actually is.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.