Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/apidiff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version: 1.24.x
go-version: 1.25.x
- name: Generate API diff
run: make apidiff
2 changes: 1 addition & 1 deletion .github/workflows/e2e-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
with:
go-version: 1.24.x
go-version: 1.25.x
- uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
version: v0.23.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- name: Install Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
with:
go-version: 1.24.x
go-version: 1.25.x
- name: Analysis
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9
with:
args: -v
2 changes: 1 addition & 1 deletion .github/workflows/unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
with:
go-version: 1.24.x
go-version: 1.25.x
- name: Run tests
run: |
make test
2 changes: 1 addition & 1 deletion .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
with:
go-version: 1.24.x
go-version: 1.25.x
- name: Run make verify
run: |
make verify
188 changes: 104 additions & 84 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,91 +1,111 @@
version: "2"
run:
timeout: 5m
go: "1.24"
go: "1.25"
tests: false
allow-parallel-runners: true

output:
formats:
- format: github-actions

linters:
disable-all: true
default: none
enable:
- dupl # check duplicated code
- goconst # check strings that can turn into constants
- gofmt # check fmt
- goimports # check imports
- gosec # check for security problems
- govet # check vet
- importas # check consistent import aliasing
- ineffassign # check ineffectual assignments
- misspell # check for misspelled English words
- nakedret # check naked returns in functions
- prealloc # check preallocated slice declarations
- revive # replacement for golint
- unconvert # check redundant type conversions
- whitespace # check for trailing whitespace and tabs
linters-settings:
revive:
rules:
# The following rules are recommended https://github.com/mgechev/revive#recommended-configuration
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
- name: increment-decrement
- name: var-naming
- name: var-declaration
- name: package-comments
- name: range
- name: receiver-naming
- name: time-naming
- name: indent-error-flow
- name: errorf
- name: empty-block
- name: superfluous-else
- name: unused-parameter
- name: unreachable-code
- name: redefines-builtin-id
importas:
no-unaliased: true
alias:
# Kubernetes
- pkg: k8s.io/api/core/v1
alias: corev1
- pkg: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
alias: apiextensionsv1
- pkg: k8s.io/api/apps/v1
alias: appsv1
- pkg: k8s.io/apimachinery/pkg/apis/meta/v1
alias: metav1
- pkg: k8s.io/apimachinery/pkg/util/runtime
alias: utilruntime
- pkg: sigs.k8s.io/controller-runtime/pkg/client
alias: runtimeclient
- pkg: k8s.io/apimachinery/pkg/util/errors
alias: kerrors
- pkg: k8s.io/client-go/kubernetes/scheme
alias: clientgoscheme
# Rancher GKE operator
- pkg: github.com/rancher/gke-operator/pkg/apis/gke.cattle.io/v1
alias: gkev1
- pkg: github.com/rancher/gke-operator/pkg/generated/controllers/gke.cattle.io/v1
alias: gkecontrollers
# Golang API
- pkg: google.golang.org/api/container/v1
alias: gkeapi
issues:
exclude-rules:
- linters:
- dupl
- goconst
- gosec
- govet
- importas
- ineffassign
- misspell
- nakedret
- prealloc
- revive
text: "var-naming: don't use an underscore in package name"
path: 'mock(\w+)/doc.go$'
exclude-dirs:
- pkg/generated
exclude-files:
- "zz_generated_*"
- unconvert
- whitespace
settings:
importas:
alias:
- pkg: k8s.io/api/core/v1
alias: corev1
- pkg: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
alias: apiextensionsv1
- pkg: k8s.io/api/apps/v1
alias: appsv1
- pkg: k8s.io/apimachinery/pkg/apis/meta/v1
alias: metav1
- pkg: k8s.io/apimachinery/pkg/util/runtime
alias: utilruntime
- pkg: sigs.k8s.io/controller-runtime/pkg/client
alias: runtimeclient
- pkg: k8s.io/apimachinery/pkg/api/errors
alias: apierrors
- pkg: k8s.io/apimachinery/pkg/util/errors
alias: kerrors
- pkg: k8s.io/client-go/kubernetes/scheme
alias: clientgoscheme
- pkg: github.com/rancher/aks-operator/pkg/apis/aks.cattle.io/v1
alias: aksv1
- pkg: github.com/rancher/aks-operator/pkg/generated/controllers/aks.cattle.io/v1
alias: akscontrollers
- pkg: github.com/rancher/rancher/pkg/apis/management.cattle.io/v3
alias: managementv3
no-unaliased: true
revive:
rules:
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
- name: increment-decrement
- name: var-naming
- name: var-declaration
- name: package-comments
- name: range
- name: receiver-naming
- name: time-naming
- name: indent-error-flow
- name: errorf
- name: empty-block
- name: superfluous-else
- name: unused-parameter
- name: unreachable-code
- name: redefines-builtin-id
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- revive
path: mock(\w+)/doc.go$
text: 'var-naming: don''t use an underscore in package name'
- linters:
- revive
path: utils/
text: 'var-naming: avoid meaningless package names'
- linters:
- importas
path: controller/gke-cluster-config-handler.go$
text: 'imported without alias but must be with alias "apierrors"'
paths:
- zz_generated_*
- pkg/generated
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
- goimports
exclusions:
generated: lax
paths:
- zz_generated_*
- pkg/generated
- third_party$
- builtin$
- examples$
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ GINKGO_VER := v2.28.1
GINKGO_BIN := ginkgo
GINKGO := $(BIN_DIR)/$(GINKGO_BIN)-$(GINKGO_VER)

GO_APIDIFF_VER := v0.8.2
GO_APIDIFF_VER := v0.8.3
GO_APIDIFF_BIN := go-apidiff
GO_APIDIFF := $(BIN_DIR)/$(GO_APIDIFF_BIN)-$(GO_APIDIFF_VER)

Expand Down
26 changes: 12 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/rancher/gke-operator

go 1.24.0

toolchain go1.24.12
go 1.25.11

replace (
k8s.io/client-go => k8s.io/client-go v0.34.1
Expand All @@ -22,7 +20,7 @@ require (
github.com/rancher/wrangler-api v0.6.1-0.20200427172631-a7c2f09b783e
github.com/rancher/wrangler/v3 v3.3.1
github.com/sirupsen/logrus v1.9.4
golang.org/x/net v0.49.0
golang.org/x/net v0.55.0
golang.org/x/oauth2 v0.35.0
google.golang.org/api v0.265.0
k8s.io/api v0.34.1
Expand Down Expand Up @@ -84,21 +82,21 @@ require (
github.com/x448/float16 v0.8.4 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
go.opentelemetry.io/otel v1.39.0 // indirect
go.opentelemetry.io/otel/metric v1.39.0 // indirect
go.opentelemetry.io/otel/trace v1.39.0 // indirect
go.opentelemetry.io/otel v1.44.0 // indirect
go.opentelemetry.io/otel/metric v1.44.0 // indirect
go.opentelemetry.io/otel/trace v1.44.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/crypto v0.47.0 // indirect
golang.org/x/mod v0.32.0 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.40.0 // indirect
golang.org/x/term v0.39.0 // indirect
golang.org/x/text v0.33.0 // indirect
golang.org/x/crypto v0.52.0 // indirect
golang.org/x/mod v0.35.0 // indirect
golang.org/x/sync v0.20.0 // indirect
golang.org/x/sys v0.45.0 // indirect
golang.org/x/term v0.43.0 // indirect
golang.org/x/text v0.37.0 // indirect
golang.org/x/time v0.14.0 // indirect
golang.org/x/tools v0.41.0 // indirect
golang.org/x/tools v0.44.0 // indirect
golang.org/x/tools/go/expect v0.1.0-deprecated // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 // indirect
google.golang.org/grpc v1.79.3 // indirect
Expand Down
Loading
Loading