Skip to content

Commit 28dc4c0

Browse files
authored
chore(runtime): bump go to 1.25.0 and deprecate automaxprocs (#2145)
1 parent 8ecc3a0 commit 28dc4c0

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

Toolchain.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CONTROLLER_GEN_VERSION = v0.17.3
99
CRDOC_VERSION = v0.6.4
1010
DART_SASS_VERSION = 1.86.0
1111
ENVTEST_VERSION = v0.21.0
12-
GOLANGCI_LINT_VERSION = v2.3.0
12+
GOLANGCI_LINT_VERSION = v2.4.0
1313
HELM_DOCS_VERSION = 1.14.2
1414
HELM_VERSION = v3.17.3
1515
HUGO_VERSION = 0.134.3

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/grafana/grafana-operator/v5
22

3-
go 1.24.2
3+
go 1.25.0
44

55
require (
66
github.com/KimMachineGun/automemlimit v0.7.4
@@ -18,7 +18,6 @@ require (
1818
github.com/spyzhov/ajson v0.9.6
1919
github.com/stretchr/testify v1.10.0
2020
github.com/testcontainers/testcontainers-go v0.38.0
21-
go.uber.org/automaxprocs v1.6.0
2221
k8s.io/api v0.33.3
2322
k8s.io/apimachinery v0.33.3
2423
k8s.io/client-go v0.33.3
@@ -86,6 +85,7 @@ require (
8685
go.opentelemetry.io/otel v1.35.0 // indirect
8786
go.opentelemetry.io/otel/metric v1.35.0 // indirect
8887
go.opentelemetry.io/otel/trace v1.35.0 // indirect
88+
go.uber.org/automaxprocs v1.6.0 // indirect
8989
golang.org/x/crypto v0.39.0 // indirect
9090
golang.org/x/sync v0.15.0 // indirect
9191
golang.org/x/tools v0.33.0 // indirect

main.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,13 @@ import (
2020
"context"
2121
"flag"
2222
"fmt"
23-
"log"
2423
"log/slog"
2524
"os"
2625
"os/signal"
2726
"strings"
2827
"syscall"
2928

3029
"github.com/KimMachineGun/automemlimit/memlimit"
31-
"go.uber.org/automaxprocs/maxprocs"
3230
uberzap "go.uber.org/zap"
3331

3432
"github.com/go-logr/logr"
@@ -44,6 +42,7 @@ import (
4442
"sigs.k8s.io/controller-runtime/pkg/client"
4543
"sigs.k8s.io/controller-runtime/pkg/config"
4644
"sigs.k8s.io/controller-runtime/pkg/webhook"
45+
4746
// Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.)
4847
// to ensure that exec-entrypoint and run can make use of them.
4948
_ "k8s.io/client-go/plugin/pkg/client/auth"
@@ -141,12 +140,6 @@ func main() { // nolint:gocyclo
141140
// Optimize Go runtime based on CGroup limits (GOMEMLIMIT, sets a soft memory limit for the runtime)
142141
memlimit.SetGoMemLimitWithOpts(memlimit.WithLogger(slogger)) //nolint:errcheck
143142

144-
// Optimize Go runtime based on CGroup limits (GOMAXPROCS, limits the number of operating system threads that can execute user-level Go code simultaneously)
145-
_, err := maxprocs.Set(maxprocs.Logger(log.Printf))
146-
if err != nil {
147-
setupLog.Error(err, "failed to adjust GOMAXPROCS")
148-
}
149-
150143
// Detect environment variables
151144
watchNamespace, _ := os.LookupEnv(watchNamespaceEnvVar)
152145
watchNamespaceSelector, _ := os.LookupEnv(watchNamespaceEnvSelector)

0 commit comments

Comments
 (0)