Skip to content

Commit 9b42b19

Browse files
committed
Add GetOptions to client GET method
As the client interface has changed with kube 1.26 the `GetOptions` has now to be passed in the GET method. Otherwise you might end up with the following error: ``` cannot use s (variable of type *memorystore.Store) as client.Client value in argument to utils.GetSecretSelector: *memorystore.Store does not implement client.Client (wrong type for method Get) have Get(_ context.Context, objectKey types.NamespacedName, obj client.Object) error want Get(ctx context.Context, key types.NamespacedName, obj client.Object, opts ...client.GetOption) error (typecheck) ```
1 parent 4675c15 commit 9b42b19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

memorystore/memorystore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func (s *Store) Create(_ context.Context, obj client.Object, opts ...client.Crea
111111
}
112112

113113
// Get implements client.Get.
114-
func (s *Store) Get(_ context.Context, objectKey client.ObjectKey, obj client.Object) error {
114+
func (s *Store) Get(_ context.Context, objectKey client.ObjectKey, obj client.Object, opts ...client.GetOption) error {
115115
key, err := clientutils.ObjectRefFromObject(s.scheme, obj)
116116
if err != nil {
117117
return err

0 commit comments

Comments
 (0)