Skip to content

// +kubebuilder:pruning:PreserveUnknownFields on array field #2178

Closed Answered by DirectXMan12
leviisfool asked this question in Support
Discussion options

You must be logged in to vote

As of controller-tools v0.2.0, all markers apply to the field itself, not items. The current best way to get it to apply to an item instead is something like this:

// +kubebuilder:pruning:PreserveUnknownFields
type MyItem unstructured.Unstructured

type Status struct {
  Deployed []MyItem
}

All that being said: unstructured.Unstructured should have PreserveUnknownFields on by default, please file a bug about that :-)

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@realnumber666
Comment options

Answer selected by DirectXMan12
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
4 participants