Use url.URL with controller-gen

339 views Asked by At

I'm trying to develop a custom resource on kubernetes with kubebuilder. In this CR, I have a field of type url.URL

I get this error :

(*in).DeepCopyInto undefined (type *url.URL has no field or method DeepCopyInto)

Is there a way to work with type url.URL when developing a CR ?

Thanks

1

There are 1 answers

0
Quentin On

So I found a solution
I don't know if it's the best but I've created a custom type URL with the part which is missing to use net/url with controller-gen.

It works fine https://gist.github.com/quentinalbertone/ec00085b57992d836c08d4586295ace7