Skip to content

Commit

Permalink
Add additional SubResource* functions for FieldOwner
Browse files Browse the repository at this point in the history
This enhances #2072 to allow FieldOwner work with SubResources to set the
FieldManager option.
  • Loading branch information
DavidS-ovm committed Dec 30, 2022
1 parent 3c4deba commit 7d32c63
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pkg/client/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,23 @@ func (f FieldOwner) ApplyToUpdate(opts *UpdateOptions) {
opts.FieldManager = string(f)
}

// ApplyToSubResourcePatch applies this configuration to the given patch options.
func (f FieldOwner) ApplyToSubResourcePatch(opts *SubResourcePatchOptions) {
opts.FieldManager = string(f)
}

// ApplyToSubResourceCreate applies this configuration to the given create options.
func (f FieldOwner) ApplyToSubResourceCreate(opts *SubResourceCreateOptions) {
opts.FieldManager = string(f)
}

// ApplyToSubResourceUpdate applies this configuration to the given update options.
func (f FieldOwner) ApplyToSubResourceUpdate(opts *SubResourceUpdateOptions) {
opts.FieldManager = string(f)
}



// }}}

// {{{ Create Options
Expand Down

0 comments on commit 7d32c63

Please sign in to comment.