@@ -187,6 +187,25 @@ type CreateOptions struct {
187
187
// this request. It must be set with server-side apply.
188
188
FieldManager string
189
189
190
+ // fieldValidation instructs the server on how to handle
191
+ // objects in the request (POST/PUT/PATCH) containing unknown
192
+ // or duplicate fields. Valid values are:
193
+ // - Ignore: This will ignore any unknown fields that are silently
194
+ // dropped from the object, and will ignore all but the last duplicate
195
+ // field that the decoder encounters. This is the default behavior
196
+ // prior to v1.23.
197
+ // - Warn: This will send a warning via the standard warning response
198
+ // header for each unknown field that is dropped from the object, and
199
+ // for each duplicate field that is encountered. The request will
200
+ // still succeed if there are no other errors, and will only persist
201
+ // the last of any duplicate fields. This is the default in v1.23+
202
+ // - Strict: This will fail the request with a BadRequest error if
203
+ // any unknown fields would be dropped from the object, or if any
204
+ // duplicate fields are present. The error returned from the server
205
+ // will contain all unknown and duplicate fields encountered.
206
+ // +optional
207
+ FieldValidation string
208
+
190
209
// Raw represents raw CreateOptions, as passed to the API server.
191
210
Raw * metav1.CreateOptions
192
211
}
@@ -679,6 +698,25 @@ type UpdateOptions struct {
679
698
// this request. It must be set with server-side apply.
680
699
FieldManager string
681
700
701
+ // fieldValidation instructs the server on how to handle
702
+ // objects in the request (POST/PUT/PATCH) containing unknown
703
+ // or duplicate fields. Valid values are:
704
+ // - Ignore: This will ignore any unknown fields that are silently
705
+ // dropped from the object, and will ignore all but the last duplicate
706
+ // field that the decoder encounters. This is the default behavior
707
+ // prior to v1.23.
708
+ // - Warn: This will send a warning via the standard warning response
709
+ // header for each unknown field that is dropped from the object, and
710
+ // for each duplicate field that is encountered. The request will
711
+ // still succeed if there are no other errors, and will only persist
712
+ // the last of any duplicate fields. This is the default in v1.23+
713
+ // - Strict: This will fail the request with a BadRequest error if
714
+ // any unknown fields would be dropped from the object, or if any
715
+ // duplicate fields are present. The error returned from the server
716
+ // will contain all unknown and duplicate fields encountered.
717
+ // +optional
718
+ FieldValidation string
719
+
682
720
// Raw represents raw UpdateOptions, as passed to the API server.
683
721
Raw * metav1.UpdateOptions
684
722
}
@@ -745,6 +783,25 @@ type PatchOptions struct {
745
783
// this request. It must be set with server-side apply.
746
784
FieldManager string
747
785
786
+ // fieldValidation instructs the server on how to handle
787
+ // objects in the request (POST/PUT/PATCH) containing unknown
788
+ // or duplicate fields. Valid values are:
789
+ // - Ignore: This will ignore any unknown fields that are silently
790
+ // dropped from the object, and will ignore all but the last duplicate
791
+ // field that the decoder encounters. This is the default behavior
792
+ // prior to v1.23.
793
+ // - Warn: This will send a warning via the standard warning response
794
+ // header for each unknown field that is dropped from the object, and
795
+ // for each duplicate field that is encountered. The request will
796
+ // still succeed if there are no other errors, and will only persist
797
+ // the last of any duplicate fields. This is the default in v1.23+
798
+ // - Strict: This will fail the request with a BadRequest error if
799
+ // any unknown fields would be dropped from the object, or if any
800
+ // duplicate fields are present. The error returned from the server
801
+ // will contain all unknown and duplicate fields encountered.
802
+ // +optional
803
+ FieldValidation string
804
+
748
805
// Raw represents raw PatchOptions, as passed to the API server.
749
806
Raw * metav1.PatchOptions
750
807
}
0 commit comments