@@ -19,6 +19,7 @@ type Funcs struct {
1919 DeleteAllOf func (ctx context.Context , client client.WithWatch , obj client.Object , opts ... client.DeleteAllOfOption ) error
2020 Update func (ctx context.Context , client client.WithWatch , obj client.Object , opts ... client.UpdateOption ) error
2121 Patch func (ctx context.Context , client client.WithWatch , obj client.Object , patch client.Patch , opts ... client.PatchOption ) error
22+ Apply func (ctx context.Context , client client.WithWatch , obj client.Object , fieldOwner string ) error
2223 Watch func (ctx context.Context , client client.WithWatch , obj client.ObjectList , opts ... client.ListOption ) (watch.Interface , error )
2324 SubResource func (client client.WithWatch , subResource string ) client.SubResourceClient
2425 SubResourceGet func (ctx context.Context , client client.Client , subResourceName string , obj client.Object , subResource client.Object , opts ... client.SubResourceGetOption ) error
@@ -92,6 +93,13 @@ func (c interceptor) Patch(ctx context.Context, obj client.Object, patch client.
9293 return c .client .Patch (ctx , obj , patch , opts ... )
9394}
9495
96+ func (c interceptor ) Apply (ctx context.Context , obj client.Object , fieldOwner string ) error {
97+ if c .funcs .Patch != nil {
98+ return c .funcs .Apply (ctx , c .client , obj , fieldOwner )
99+ }
100+ return c .client .Apply (ctx , obj , fieldOwner )
101+ }
102+
95103func (c interceptor ) DeleteAllOf (ctx context.Context , obj client.Object , opts ... client.DeleteAllOfOption ) error {
96104 if c .funcs .DeleteAllOf != nil {
97105 return c .funcs .DeleteAllOf (ctx , c .client , obj , opts ... )
0 commit comments