Skip to content

Commit c055712

Browse files
authored
Merge pull request #396 from roguepikachu/chore/upgrade-go-k8s-version
Chore: upgrades Go (1.23.8) and K8s (1.31.0) versions
2 parents 0845592 + 2e7d7be commit c055712

File tree

25 files changed

+435
-854
lines changed

25 files changed

+435
-854
lines changed

.github/workflows/e2e-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ on:
1212
- master
1313

1414
env:
15-
GO_VERSION: '1.17.6'
15+
GO_VERSION: '1.23.8'
1616
KIND_VERSION: 'v0.12.0'
1717

1818
jobs:
1919
e2e-tests:
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-22.04
2121

2222
steps:
2323
- name: Check out code into the Go module directory

.github/workflows/format.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ on:
1313

1414
env:
1515
# Common versions
16-
GO_VERSION: '1.17.6'
16+
GO_VERSION: '1.23.8'
1717
KIND_VERSION: 'v0.7.0'
1818

1919
jobs:
2020
detect-noop:
21-
runs-on: ubuntu-20.04
21+
runs-on: ubuntu-22.04
2222
outputs:
2323
noop: ${{ steps.noop.outputs.should_skip }}
2424
steps:
@@ -32,7 +32,7 @@ jobs:
3232
concurrent_skipping: false
3333

3434
make-reviewable:
35-
runs-on: ubuntu-20.04
35+
runs-on: ubuntu-22.04
3636
needs: detect-noop
3737
if: needs.detect-noop.outputs.noop != 'true'
3838

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Set up Go
2525
uses: actions/setup-go@v2
2626
with:
27-
go-version: 1.17
27+
go-version: 1.23
2828
- name: Get release
2929
id: get_release
3030
uses: bruceadams/get-release@v1.2.2

.github/workflows/unit-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515

1616
env:
1717
# Common versions
18-
GO_VERSION: '1.17.6'
18+
GO_VERSION: '1.23.8'
1919

2020
jobs:
2121
lint:
@@ -31,7 +31,7 @@ jobs:
3131
make lint
3232
3333
unit-tests:
34-
runs-on: ubuntu-20.04
34+
runs-on: ubuntu-22.04
3535

3636
steps:
3737
- name: Set up Go
@@ -46,7 +46,7 @@ jobs:
4646
submodules: true
4747

4848
- name: Cache Go Dependencies
49-
uses: actions/cache@v2
49+
uses: actions/cache@v4
5050
with:
5151
path: .work/pkg
5252
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}

.golangci.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@ run:
22
timeout: 10m
33

44
skip-files:
5-
- "zz_generated\\..+\\.go$"
6-
- ".*_test.go$"
5+
76

87
output:
98
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
10-
format: colored-line-number
9+
formats: colored-line-number
1110

1211
linters-settings:
1312
errcheck:
@@ -22,7 +21,7 @@ linters-settings:
2221
# [deprecated] comma-separated list of pairs of the form pkg:regex
2322
# the regex is used to ignore names within pkg. (default "fmt:.*").
2423
# see https://github.com/kisielk/errcheck#the-deprecated-method for details
25-
ignore: fmt:.*,io/ioutil:^Read.*
24+
exclude-functions: fmt:.*,io/ioutil:^Read.*
2625

2726
exhaustive:
2827
# indicates that switch statements are to be considered exhaustive if a
@@ -100,7 +99,6 @@ linters-settings:
10099

101100
linters:
102101
enable:
103-
- megacheck
104102
- govet
105103
- gocyclo
106104
- gocritic
@@ -111,6 +109,9 @@ linters:
111109
- unconvert
112110
- misspell
113111
- nakedret
112+
- staticcheck
113+
- gosimple
114+
- unused
114115

115116
presets:
116117
- bugs
@@ -119,6 +120,12 @@ linters:
119120

120121

121122
issues:
123+
exclude-files:
124+
# Exclude files that are generated by controller-gen.
125+
- "zz_generated\\..+\\.go$"
126+
# Exclude test files.
127+
- ".*_test.go$"
128+
122129
# Excluding configuration per-path and per-linter
123130
exclude-rules:
124131
# Exclude some linters from running on tests files.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM golang:1.17-alpine as builder
2+
FROM golang:1.23-alpine as builder
33

44
WORKDIR /workspace
55
# Copy the Go Modules manifests

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
IMG ?= oamdev/terraform-controller:0.2.8
44

55
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
6-
CRD_OPTIONS ?= "crd:trivialVersions=true"
6+
CRD_OPTIONS ?= "crd"
77

88
TIME_SHORT = `date +%H:%M:%S`
99
TIME = $(TIME_SHORT)
@@ -82,15 +82,15 @@ ifeq (, $(shell which controller-gen))
8282
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
8383
cd $$CONTROLLER_GEN_TMP_DIR ;\
8484
go mod init tmp ;\
85-
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.2 ;\
85+
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.5 ;\
8686
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
8787
}
8888
CONTROLLER_GEN=$(GOBIN)/controller-gen
8989
else
9090
CONTROLLER_GEN=$(shell which controller-gen)
9191
endif
9292

93-
GOLANGCILINT_VERSION ?= v1.50.1
93+
GOLANGCILINT_VERSION ?= v1.60.1
9494
HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]')
9595
HOSTARCH := $(shell uname -m)
9696
ifeq ($(HOSTARCH),x86_64)
@@ -131,7 +131,7 @@ goimports:
131131
ifeq (, $(shell which goimports))
132132
@{ \
133133
set -e ;\
134-
GO111MODULE=off go get -u golang.org/x/tools/cmd/goimports ;\
134+
go install golang.org/x/tools/cmd/goimports@latest ;\
135135
}
136136
GOIMPORTS=$(GOBIN)/goimports
137137
else

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1beta2/zz_generated.deepcopy.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)