Skip to content

Commit 7d32c63

Browse files
committed
Add additional SubResource* functions for FieldOwner
This enhances #2072 to allow FieldOwner work with SubResources to set the FieldManager option.
1 parent 3c4deba commit 7d32c63

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

pkg/client/options.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,23 @@ func (f FieldOwner) ApplyToUpdate(opts *UpdateOptions) {
154154
opts.FieldManager = string(f)
155155
}
156156

157+
// ApplyToSubResourcePatch applies this configuration to the given patch options.
158+
func (f FieldOwner) ApplyToSubResourcePatch(opts *SubResourcePatchOptions) {
159+
opts.FieldManager = string(f)
160+
}
161+
162+
// ApplyToSubResourceCreate applies this configuration to the given create options.
163+
func (f FieldOwner) ApplyToSubResourceCreate(opts *SubResourceCreateOptions) {
164+
opts.FieldManager = string(f)
165+
}
166+
167+
// ApplyToSubResourceUpdate applies this configuration to the given update options.
168+
func (f FieldOwner) ApplyToSubResourceUpdate(opts *SubResourceUpdateOptions) {
169+
opts.FieldManager = string(f)
170+
}
171+
172+
173+
157174
// }}}
158175

159176
// {{{ Create Options

0 commit comments

Comments
 (0)