diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f305704827..53d1fe0190 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,8 +20,8 @@ env: E2E_SETUP_KIND: yes E2E_SETUP_KUBECTL: yes SUDO: sudo - GO_VERSION: "^1.22" - GOLANGCI_LINT_VERSION: "v1.56.2" + GO_VERSION: "^1.23" + GOLANGCI_LINT_VERSION: "v1.60.3" jobs: ci-go-lint: diff --git a/Makefile b/Makefile index 467b73e6b0..3295f965ba 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ OS ?= $(shell uname -s | tr A-Z a-z) ALL_ARCH = amd64 arm arm64 ppc64le s390x PKG = github.com/prometheus/common PROMETHEUS_VERSION = 2.53.1 -GO_VERSION = 1.22.5 +GO_VERSION = 1.23.0 IMAGE = $(REGISTRY)/kube-state-metrics MULTI_ARCH_IMG = $(IMAGE)-$(ARCH) USER ?= $(shell id -u -n) diff --git a/go.mod b/go.mod index 206ce2a1b8..fefbc9f72a 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module k8s.io/kube-state-metrics/v2 -go 1.22.0 - -toolchain go1.22.5 +go 1.23.0 require ( github.com/KimMachineGun/automemlimit v0.6.1 diff --git a/pkg/app/server_test.go b/pkg/app/server_test.go index f7d33bac85..9f6c0be970 100644 --- a/pkg/app/server_test.go +++ b/pkg/app/server_test.go @@ -861,7 +861,7 @@ func pod(client *fake.Clientset, index int) error { func foo(client *samplefake.Clientset, index int) error { i := strconv.Itoa(index) - desiredReplicas := int32(index) + desiredReplicas := int32(index) //nolint:gosec foo := samplev1alpha1.Foo{ ObjectMeta: metav1.ObjectMeta{ diff --git a/pkg/customresourcestate/custom_resource_metrics_test.go b/pkg/customresourcestate/custom_resource_metrics_test.go index 31121de75c..fa31029922 100644 --- a/pkg/customresourcestate/custom_resource_metrics_test.go +++ b/pkg/customresourcestate/custom_resource_metrics_test.go @@ -229,7 +229,7 @@ func TestNewCustomResourceMetrics(t *testing.T) { t.Run(tt.name, func(t *testing.T) { v, err := NewCustomResourceMetrics(tt.r) if err != nil { - t.Errorf(err.Error()) + t.Error(err.Error()) } // convert to JSON for easier nil comparison diff --git a/pkg/metricshandler/metrics_handler.go b/pkg/metricshandler/metrics_handler.go index e944033c12..9d02dd0b95 100644 --- a/pkg/metricshandler/metrics_handler.go +++ b/pkg/metricshandler/metrics_handler.go @@ -256,7 +256,7 @@ func detectNominalFromPod(statefulSetName, podName string) (int32, error) { return 0, fmt.Errorf("failed to detect shard index for Pod %s of StatefulSet %s, parsed %s: %w", podName, statefulSetName, nominalString, err) } - return int32(nominal), nil + return int32(nominal), nil //nolint:gosec } func detectStatefulSet(kubeClient kubernetes.Interface, podName, namespaceName string) (*appsv1.StatefulSet, error) { diff --git a/tools/go.mod b/tools/go.mod index 8f25270889..302640a667 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -1,6 +1,6 @@ module k8s.io/kube-state-metrics/v2/tools -go 1.21 +go 1.23.0 require ( github.com/brancz/gojsontoyaml v0.1.0