Skip to content

Commit cb13814

Browse files
authored
Merge pull request #160 from semmet95/chore/go-upgrade-1-23
Chore: Upgrade golang to 1.23
2 parents beb72a9 + 54691f5 commit cb13814

File tree

17 files changed

+272
-282
lines changed

17 files changed

+272
-282
lines changed

.github/workflows/ci.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
env:
1313
# Common versions
14-
GO_VERSION: '1.22'
14+
GO_VERSION: '1.23'
1515
GOLANGCI_VERSION: 'v1.56'
1616
KIND_VERSION: 'v0.23.0'
1717

@@ -37,16 +37,16 @@ jobs:
3737
if: needs.detect-noop.outputs.noop != 'true'
3838
steps:
3939
- name: Set up Go
40-
uses: actions/setup-go@v1
40+
uses: actions/setup-go@v5
4141
with:
4242
go-version: ${{ env.GO_VERSION }}
4343
id: go
4444
- name: Checkout
45-
uses: actions/checkout@v2
45+
uses: actions/checkout@v4
4646
with:
4747
submodules: true
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') }}
@@ -60,7 +60,7 @@ jobs:
6060
- name: Run Make test
6161
run: make test
6262
- name: Upload coverage report
63-
uses: codecov/codecov-action@v3
63+
uses: codecov/codecov-action@v5
6464
with:
6565
token: ${{ secrets.CODECOV_TOKEN }}
6666
file: cover.out
@@ -77,16 +77,16 @@ jobs:
7777
if: needs.detect-noop.outputs.noop != 'true'
7878
steps:
7979
- name: Set up Go
80-
uses: actions/setup-go@v1
80+
uses: actions/setup-go@v5
8181
with:
8282
go-version: ${{ env.GO_VERSION }}
8383
id: go
8484
- name: Checkout
85-
uses: actions/checkout@v2
85+
uses: actions/checkout@v4
8686
with:
8787
submodules: true
8888
- name: Cache Go Dependencies
89-
uses: actions/cache@v2
89+
uses: actions/cache@v4
9090
with:
9191
path: .work/pkg
9292
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
@@ -95,7 +95,7 @@ jobs:
9595
uses: helm/kind-action@v1.2.0
9696
with:
9797
version: v0.24.0
98-
node_image: kindest/node:v1.29.8
98+
node_image: kindest/node:v1.31.1
9999
- name: Build Image
100100
run: |
101101
make image
@@ -120,16 +120,16 @@ jobs:
120120
if: needs.detect-noop.outputs.noop != 'true'
121121
steps:
122122
- name: Set up Go
123-
uses: actions/setup-go@v1
123+
uses: actions/setup-go@v5
124124
with:
125125
go-version: ${{ env.GO_VERSION }}
126126
id: go
127127
- name: Checkout
128-
uses: actions/checkout@v2
128+
uses: actions/checkout@v4
129129
with:
130130
submodules: true
131131
- name: Cache Go Dependencies
132-
uses: actions/cache@v2
132+
uses: actions/cache@v4
133133
with:
134134
path: .work/pkg
135135
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
@@ -140,7 +140,7 @@ jobs:
140140
uses: helm/kind-action@v1.2.0
141141
with:
142142
version: v0.24.0
143-
node_image: kindest/node:v1.29.8
143+
node_image: kindest/node:v1.31.1
144144
- name: Prepare OCM testing environment
145145
run: |
146146
clusteradm init --output-join-command-file join.sh --wait

.github/workflows/go-release.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 'v*'
77
env:
88
# Common versions
9-
GO_VERSION: '1.22'
9+
GO_VERSION: '1.23'
1010
GO_REQUIRED_MIN_VERSION: ''
1111
GOPATH: '/home/runner/work/oamdev/cluster-gateway/go'
1212
GITHUB_REF: ${{ github.ref }}
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: checkout code
24-
uses: actions/checkout@v2
24+
uses: actions/checkout@v4
2525
with:
2626
fetch-depth: 1
2727
path: go/src/oamdev/cluster-gateway
@@ -50,12 +50,13 @@ jobs:
5050
arch: [ amd64, arm64 ]
5151
steps:
5252
- name: checkout code
53-
uses: actions/checkout@v2
53+
uses: actions/checkout@v4
5454
with:
5555
fetch-depth: 1
5656
path: go/src/oamdev/cluster-gateway
57+
clean: true
5758
- name: install Go
58-
uses: actions/setup-go@v2
59+
uses: actions/setup-go@v5
5960
with:
6061
go-version: ${{ env.GO_VERSION }}
6162
- name: images multi arch
@@ -65,7 +66,7 @@ jobs:
6566
ARCH=${{ matrix.arch }} \
6667
make image
6768
- name: Login docker.io
68-
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
69+
uses: docker/login-action@v3
6970
with:
7071
registry: docker.io
7172
username: ${{ secrets.DOCKER_USER }}
@@ -80,12 +81,13 @@ jobs:
8081
needs: [ env, image-multi-arch ]
8182
steps:
8283
- name: checkout code
83-
uses: actions/checkout@v2
84+
uses: actions/checkout@v4
8485
with:
8586
fetch-depth: 1
8687
path: go/src/oamdev/cluster-gateway
88+
clean: 'true'
8789
- name: Login docker.io
88-
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
90+
uses: docker/login-action@v3
8991
with:
9092
registry: docker.io
9193
username: ${{ secrets.DOCKER_USER }}
@@ -118,15 +120,17 @@ jobs:
118120
needs: [ env, image-manifest ]
119121
steps:
120122
- name: checkout code
121-
uses: actions/checkout@v2
123+
uses: actions/checkout@v4
122124
with:
123125
fetch-depth: 1
124126
path: go/src/oamdev/cluster-gateway
125127
- name: setup helm
126128
uses: azure/setup-helm@v1
127129
- name: chart package
128130
run: |
129-
mkdir -p release
131+
if [ ! -d release ]; then
132+
mkdir release
133+
fi
130134
pushd release
131135
helm package ../charts/cluster-gateway/
132136
helm package ../charts/addon-manager/

Makefile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,19 +108,20 @@ ifeq (, $(shell which kustomize))
108108
go mod init tmp ;\
109109
go get sigs.k8s.io/kustomize/kustomize/v3@v3.5.4 ;\
110110
rm -rf $$KUSTOMIZE_GEN_TMP_DIR ;\
111-
}
111+
}chore: update event handling to use typed events and bump dependencies
112112
KUSTOMIZE=$(GOBIN)/kustomize
113113
else
114114
KUSTOMIZE=$(shell which kustomize)
115115
endif
116116

117+
117118
client-gen:
118-
go install k8s.io/code-generator/cmd/client-gen@v0.29.2
119+
go install k8s.io/code-generator/cmd/client-gen@v0.31.1
119120
apiserver-runtime-gen \
120-
--module github.com/oam-dev/cluster-gateway \
121-
-g client-gen \
122-
--versions=github.com/oam-dev/cluster-gateway/pkg/apis/cluster/v1alpha1 \
123-
--install-generators=false
121+
--module github.com/oam-dev/cluster-gateway \
122+
-g client-gen \
123+
--versions=github.com/oam-dev/cluster-gateway/pkg/apis/cluster/v1alpha1 \
124+
--install-generators=false
124125

125126

126127
generate: controller-gen
@@ -178,4 +179,4 @@ test-e2e: e2e-binary
178179
./bin/e2e --test-cluster=loopback
179180

180181
test-e2e-ocm: e2e-binary-ocm
181-
./bin/e2e.ocm --test-cluster=loopback
182+
./bin/e2e.ocm --test-cluster=loopback

charts/addon-manager/templates/clusterroles.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ rules:
8080
resources:
8181
- mutatingwebhookconfigurations
8282
- validatingwebhookconfigurations
83+
- validatingadmissionpolicies
84+
- validatingadmissionpolicybindings
8385
verbs:
8486
- get
8587
- list

charts/cluster-gateway/templates/clusterroles.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ rules:
2424
resources:
2525
- mutatingwebhookconfigurations
2626
- validatingwebhookconfigurations
27+
- validatingadmissionpolicies
28+
- validatingadmissionpolicybindings
2729
verbs:
2830
- get
2931
- list

cmd/addon-manager/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ARG OS=linux
22
ARG ARCH=amd64
33
# Build the manager binary
4-
FROM golang:1.22 as builder
4+
FROM golang:1.23 as builder
55
ARG OS
66
ARG ARCH
77

cmd/apiserver/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.22-alpine as builder
2+
FROM golang:1.23-alpine as builder
33
ARG OS
44
ARG ARCH
55

0 commit comments

Comments
 (0)