Skip to content

Commit f92f587

Browse files
committed
Explain why we don't update the namespaced client
1 parent 892382c commit f92f587

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/client/namespaced_client.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ func (n *namespacedClient) Patch(ctx context.Context, obj Object, patch Patch, o
149149
}
150150

151151
func (n *namespacedClient) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...ApplyOption) error {
152+
// It is non-trivial to make this work as the current check if an object is namespaces takes a runtime.Object,
153+
// we would need to update that to be able to deal with a runtime.ApplyConfiguration. Additionally, ACs
154+
// do allow setting the namespace through a `WithNamespace(string) T` method, but we would have to use reflect
155+
// due to the `T` return.
152156
return errors.New("Apply is not supported on namespaced client")
153157
}
154158

0 commit comments

Comments
 (0)