Prior to the creation of the community maintained fork, I created influxdata/telegraf-operator#155 as a jumping off point to update telegraf-operator to use golang 1.24 with some refreshed dependencies.
telegraf-operator currently specifies go 1.18 in go.mod, but recent golang.org/x/net requires golang 1.23. In updating telegraf-operator to golang 1.24, many changes were required to make go vet happy, allow code to compile, etc. That PR does quite a few things:
- go.mod:
- updates to
go 1.24
- updates github.com/kudobuilder/kuttl to v0.22.0 (to work with newer github.com/docker/docker)
- updates sigs.k8s.io/controller-runtime to v0.20.4 (needed for newer toolchain)
- updates
handler.go for go vet
- updates
handler_test.go for go vet and newer sigs.k8s.io/controller-runtime
- updates
main.go for newer sigs.k8s.io/controller-runtime
- updates
sidecar_test.go for newer github.com/kudobuilder/kuttl
- updates
Makefile to use sigs.k8s.io/controller-tools/cmd/controller-gen@v0.17.2, needed for the above
- updates
Makefile to use crd:crdVersions=v1 instead of crd:trivialVersions=true, needed for sigs.k8s.io/controller-tools/cmd/controller-gen@v0.17.2 (IMPORTANT: this remove v1beta)
Once I ran go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.17.2 to update ~/go/bin/controller-gen, with the above changes, it builds. Yay! BUT, the testsuite fails, presumably because of the CRD changes from the upgrade to sigs.k8s.io/controller-tools/cmd/controller-gen@v0.17.2.
influxdata/telegraf-operator#155 is unreviewed, untested and I don't plan to continue working on the PR, but hopefully it can provide a jumping off point for this community fork. (Note, the https://github.com/InfluxCommunity/telegraf-operator/tree/jdstrand/update-to-go1.24 branch in this repo was imported from influxdata/telegraf-operator#155)
Prior to the creation of the community maintained fork, I created influxdata/telegraf-operator#155 as a jumping off point to update
telegraf-operatorto use golang 1.24 with some refreshed dependencies.telegraf-operatorcurrently specifiesgo 1.18ingo.mod, but recentgolang.org/x/netrequires golang 1.23. In updatingtelegraf-operatorto golang 1.24, many changes were required to makego vethappy, allow code to compile, etc. That PR does quite a few things:go 1.24handler.goforgo vethandler_test.goforgo vetand newer sigs.k8s.io/controller-runtimemain.gofor newer sigs.k8s.io/controller-runtimesidecar_test.gofor newer github.com/kudobuilder/kuttlMakefileto use sigs.k8s.io/controller-tools/cmd/controller-gen@v0.17.2, needed for the aboveMakefileto usecrd:crdVersions=v1instead ofcrd:trivialVersions=true, needed for sigs.k8s.io/controller-tools/cmd/controller-gen@v0.17.2 (IMPORTANT: this removev1beta)Once I ran
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.17.2to update ~/go/bin/controller-gen, with the above changes, it builds. Yay! BUT, the testsuite fails, presumably because of the CRD changes from the upgrade to sigs.k8s.io/controller-tools/cmd/controller-gen@v0.17.2.influxdata/telegraf-operator#155 is unreviewed, untested and I don't plan to continue working on the PR, but hopefully it can provide a jumping off point for this community fork. (Note, the https://github.com/InfluxCommunity/telegraf-operator/tree/jdstrand/update-to-go1.24 branch in this repo was imported from influxdata/telegraf-operator#155)