diff --git a/controllers/external/util.go b/controllers/external/util.go index fde450016080..e43cc2ae7e3e 100644 --- a/controllers/external/util.go +++ b/controllers/external/util.go @@ -31,7 +31,7 @@ import ( ) // Get uses the client and reference to get an external, unstructured object. -func Get(ctx context.Context, c client.Client, ref *corev1.ObjectReference, namespace string) (*unstructured.Unstructured, error) { +func Get(ctx context.Context, c client.Reader, ref *corev1.ObjectReference, namespace string) (*unstructured.Unstructured, error) { if ref == nil { return nil, errors.Errorf("cannot get object - object reference not set") } @@ -47,7 +47,7 @@ func Get(ctx context.Context, c client.Client, ref *corev1.ObjectReference, name } // Delete uses the client and reference to delete an external, unstructured object. -func Delete(ctx context.Context, c client.Client, ref *corev1.ObjectReference) error { +func Delete(ctx context.Context, c client.Writer, ref *corev1.ObjectReference) error { obj := new(unstructured.Unstructured) obj.SetAPIVersion(ref.APIVersion) obj.SetKind(ref.Kind)