mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 10:53:34 +00:00
rebase: update controller-runtime
update controller-runtime to latest release. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
5a66991bb3
commit
dbbca6ebf8
99
vendor/sigs.k8s.io/controller-runtime/pkg/client/options.go
generated
vendored
99
vendor/sigs.k8s.io/controller-runtime/pkg/client/options.go
generated
vendored
@ -169,6 +169,39 @@ func (f FieldOwner) ApplyToSubResourceUpdate(opts *SubResourceUpdateOptions) {
|
||||
opts.FieldManager = string(f)
|
||||
}
|
||||
|
||||
// FieldValidation configures field validation for the given requests.
|
||||
type FieldValidation string
|
||||
|
||||
// ApplyToPatch applies this configuration to the given patch options.
|
||||
func (f FieldValidation) ApplyToPatch(opts *PatchOptions) {
|
||||
opts.FieldValidation = string(f)
|
||||
}
|
||||
|
||||
// ApplyToCreate applies this configuration to the given create options.
|
||||
func (f FieldValidation) ApplyToCreate(opts *CreateOptions) {
|
||||
opts.FieldValidation = string(f)
|
||||
}
|
||||
|
||||
// ApplyToUpdate applies this configuration to the given update options.
|
||||
func (f FieldValidation) ApplyToUpdate(opts *UpdateOptions) {
|
||||
opts.FieldValidation = string(f)
|
||||
}
|
||||
|
||||
// ApplyToSubResourcePatch applies this configuration to the given patch options.
|
||||
func (f FieldValidation) ApplyToSubResourcePatch(opts *SubResourcePatchOptions) {
|
||||
opts.FieldValidation = string(f)
|
||||
}
|
||||
|
||||
// ApplyToSubResourceCreate applies this configuration to the given create options.
|
||||
func (f FieldValidation) ApplyToSubResourceCreate(opts *SubResourceCreateOptions) {
|
||||
opts.FieldValidation = string(f)
|
||||
}
|
||||
|
||||
// ApplyToSubResourceUpdate applies this configuration to the given update options.
|
||||
func (f FieldValidation) ApplyToSubResourceUpdate(opts *SubResourceUpdateOptions) {
|
||||
opts.FieldValidation = string(f)
|
||||
}
|
||||
|
||||
// }}}
|
||||
|
||||
// {{{ Create Options
|
||||
@ -187,6 +220,24 @@ type CreateOptions struct {
|
||||
// this request. It must be set with server-side apply.
|
||||
FieldManager string
|
||||
|
||||
// fieldValidation instructs the server on how to handle
|
||||
// objects in the request (POST/PUT/PATCH) containing unknown
|
||||
// or duplicate fields. Valid values are:
|
||||
// - Ignore: This will ignore any unknown fields that are silently
|
||||
// dropped from the object, and will ignore all but the last duplicate
|
||||
// field that the decoder encounters. This is the default behavior
|
||||
// prior to v1.23.
|
||||
// - Warn: This will send a warning via the standard warning response
|
||||
// header for each unknown field that is dropped from the object, and
|
||||
// for each duplicate field that is encountered. The request will
|
||||
// still succeed if there are no other errors, and will only persist
|
||||
// the last of any duplicate fields. This is the default in v1.23+
|
||||
// - Strict: This will fail the request with a BadRequest error if
|
||||
// any unknown fields would be dropped from the object, or if any
|
||||
// duplicate fields are present. The error returned from the server
|
||||
// will contain all unknown and duplicate fields encountered.
|
||||
FieldValidation string
|
||||
|
||||
// Raw represents raw CreateOptions, as passed to the API server.
|
||||
Raw *metav1.CreateOptions
|
||||
}
|
||||
@ -203,6 +254,7 @@ func (o *CreateOptions) AsCreateOptions() *metav1.CreateOptions {
|
||||
|
||||
o.Raw.DryRun = o.DryRun
|
||||
o.Raw.FieldManager = o.FieldManager
|
||||
o.Raw.FieldValidation = o.FieldValidation
|
||||
return o.Raw
|
||||
}
|
||||
|
||||
@ -223,6 +275,9 @@ func (o *CreateOptions) ApplyToCreate(co *CreateOptions) {
|
||||
if o.FieldManager != "" {
|
||||
co.FieldManager = o.FieldManager
|
||||
}
|
||||
if o.FieldValidation != "" {
|
||||
co.FieldValidation = o.FieldValidation
|
||||
}
|
||||
if o.Raw != nil {
|
||||
co.Raw = o.Raw
|
||||
}
|
||||
@ -679,6 +734,24 @@ type UpdateOptions struct {
|
||||
// this request. It must be set with server-side apply.
|
||||
FieldManager string
|
||||
|
||||
// fieldValidation instructs the server on how to handle
|
||||
// objects in the request (POST/PUT/PATCH) containing unknown
|
||||
// or duplicate fields. Valid values are:
|
||||
// - Ignore: This will ignore any unknown fields that are silently
|
||||
// dropped from the object, and will ignore all but the last duplicate
|
||||
// field that the decoder encounters. This is the default behavior
|
||||
// prior to v1.23.
|
||||
// - Warn: This will send a warning via the standard warning response
|
||||
// header for each unknown field that is dropped from the object, and
|
||||
// for each duplicate field that is encountered. The request will
|
||||
// still succeed if there are no other errors, and will only persist
|
||||
// the last of any duplicate fields. This is the default in v1.23+
|
||||
// - Strict: This will fail the request with a BadRequest error if
|
||||
// any unknown fields would be dropped from the object, or if any
|
||||
// duplicate fields are present. The error returned from the server
|
||||
// will contain all unknown and duplicate fields encountered.
|
||||
FieldValidation string
|
||||
|
||||
// Raw represents raw UpdateOptions, as passed to the API server.
|
||||
Raw *metav1.UpdateOptions
|
||||
}
|
||||
@ -695,6 +768,7 @@ func (o *UpdateOptions) AsUpdateOptions() *metav1.UpdateOptions {
|
||||
|
||||
o.Raw.DryRun = o.DryRun
|
||||
o.Raw.FieldManager = o.FieldManager
|
||||
o.Raw.FieldValidation = o.FieldValidation
|
||||
return o.Raw
|
||||
}
|
||||
|
||||
@ -717,6 +791,9 @@ func (o *UpdateOptions) ApplyToUpdate(uo *UpdateOptions) {
|
||||
if o.FieldManager != "" {
|
||||
uo.FieldManager = o.FieldManager
|
||||
}
|
||||
if o.FieldValidation != "" {
|
||||
uo.FieldValidation = o.FieldValidation
|
||||
}
|
||||
if o.Raw != nil {
|
||||
uo.Raw = o.Raw
|
||||
}
|
||||
@ -745,6 +822,24 @@ type PatchOptions struct {
|
||||
// this request. It must be set with server-side apply.
|
||||
FieldManager string
|
||||
|
||||
// fieldValidation instructs the server on how to handle
|
||||
// objects in the request (POST/PUT/PATCH) containing unknown
|
||||
// or duplicate fields. Valid values are:
|
||||
// - Ignore: This will ignore any unknown fields that are silently
|
||||
// dropped from the object, and will ignore all but the last duplicate
|
||||
// field that the decoder encounters. This is the default behavior
|
||||
// prior to v1.23.
|
||||
// - Warn: This will send a warning via the standard warning response
|
||||
// header for each unknown field that is dropped from the object, and
|
||||
// for each duplicate field that is encountered. The request will
|
||||
// still succeed if there are no other errors, and will only persist
|
||||
// the last of any duplicate fields. This is the default in v1.23+
|
||||
// - Strict: This will fail the request with a BadRequest error if
|
||||
// any unknown fields would be dropped from the object, or if any
|
||||
// duplicate fields are present. The error returned from the server
|
||||
// will contain all unknown and duplicate fields encountered.
|
||||
FieldValidation string
|
||||
|
||||
// Raw represents raw PatchOptions, as passed to the API server.
|
||||
Raw *metav1.PatchOptions
|
||||
}
|
||||
@ -771,6 +866,7 @@ func (o *PatchOptions) AsPatchOptions() *metav1.PatchOptions {
|
||||
o.Raw.DryRun = o.DryRun
|
||||
o.Raw.Force = o.Force
|
||||
o.Raw.FieldManager = o.FieldManager
|
||||
o.Raw.FieldValidation = o.FieldValidation
|
||||
return o.Raw
|
||||
}
|
||||
|
||||
@ -787,6 +883,9 @@ func (o *PatchOptions) ApplyToPatch(po *PatchOptions) {
|
||||
if o.FieldManager != "" {
|
||||
po.FieldManager = o.FieldManager
|
||||
}
|
||||
if o.FieldValidation != "" {
|
||||
po.FieldValidation = o.FieldValidation
|
||||
}
|
||||
if o.Raw != nil {
|
||||
po.Raw = o.Raw
|
||||
}
|
||||
|
Reference in New Issue
Block a user