digitalocean / digitalocean-cloud-controller-manager

Kubernetes cloud-controller-manager for DigitalOcean (beta)
Apache License 2.0
518 stars 146 forks source link

go.mod: update go to 1.22 #712

Closed dhij closed 2 months ago

dhij commented 2 months ago

@timoreimann @llDrLove -

Please note I added a bunch of replace directives in go.mod because of interdependencies between different packages.

For example, when controller-runtime was updated to 0.30.0 along with go mod tidy, it gave me the undefined: leaderelection.SwitchMetric error in the CI. The leaderelection.SwitchMetric is from the k8s.io/client-go/tools/leaderelection package. So I added a replace directive k8s.io/client-go v0.30.0 => k8s.io/client-go v0.29.0. But then that led to another error from the k8s.io/apiserver complaining that now it had another undefined method, so i added another replace directive for k8s.io/apiserver and so on. That led to downgrading multiple packages and dependencies.

That might not be the best approach but please let me know if you have any other suggestions 👍

dhij commented 2 months ago

@timoreimann @llDrLove Oh I just realized maybe this is the part where I might have to hold off and wait for our dependencies to update their dependencies instead of using the replace directives as I describe above 🙂

dhij commented 2 months ago

@timoreimann @llDrLove we still need 3 replace directives but now thats much less than what we had before and all the k8s.io/* packages are up-to-date at v0.30.0 so i think this should be good 👍