Pass GetOptions through to wrapped client

Signed-off-by: Nic Cope <nicc@rk0n.org>
This commit is contained in:
Nic Cope 2023-01-25 10:10:11 -08:00
parent 71190c3e9a
commit b099031ba0
1 changed files with 2 additions and 2 deletions

View File

@ -56,9 +56,9 @@ type WrapperClient struct {
// returned by the Server.
func (c *WrapperClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error {
if u, ok := obj.(Wrapper); ok {
return c.kube.Get(ctx, key, u.GetUnstructured())
return c.kube.Get(ctx, key, u.GetUnstructured(), opts...)
}
return c.kube.Get(ctx, key, obj)
return c.kube.Get(ctx, key, obj, opts...)
}
// List retrieves list of objects for a given namespace and list options. On a