fluxcd / pkg

Toolkit common packages
https://pkg.go.dev/github.com/fluxcd/pkg
Apache License 2.0
45 stars 84 forks source link

Update dependencies to Kubernetes 1.30 and adapt to breaking changes #763

Closed stefanprodan closed 2 months ago

stefanprodan commented 3 months ago

⚠️ There is a breaking change in Kubernetes 1.30 client-go introduced in https://github.com/kubernetes/kubernetes/pull/122069 where the leaderelection.SwitchMetric was renamed to leaderelection.LeaderMetric and this breaks controller-runtime. So we have to pin controller-runtime to an unreleased version that contains https://github.com/kubernetes-sigs/controller-runtime/pull/2693 here and in every Flux controller.

PS. The breaking change was addressed in https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.18.0

We can't release Flux v2.3 without bumping Kubernetes to 1.30 and be stuck on 1.29 till end of Q3. I think we should go forward with this, when controller-runtime has a stable release that includes client-go 1.30, we'll do a patch release for Flux v2.3.

PS. Using major.minor for the Go version in go.mod is no longer possible because Kubernetes switched to full semver.