Skip to content

Commit

Permalink
Add additional SubResource* functions for FieldOwner
Browse files Browse the repository at this point in the history
This enhances kubernetes-sigs#2072 to allow FieldOwner work with SubResources to set the
FieldManager option.
  • Loading branch information
DavidS-ovm authored and k8s-infra-cherrypick-robot committed Jan 29, 2023
1 parent 7a4c6ec commit 244cca3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pkg/client/options.go
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 244cca3

Please sign in to comment.