Skip to content

Commit 29d988d

Browse files
authored
Update to go-1.23 (#100)
1 parent c5a5b28 commit 29d988d

21 files changed

+246
-346
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

.github/workflows/docker.yaml

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ jobs:
2323

2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v3
26+
uses: actions/checkout@v4
2727

28-
- name: Set up Go 1.19
29-
uses: actions/setup-go@v3
28+
- name: Set up Go 1.23
29+
uses: actions/setup-go@v5
3030
with:
31-
go-version: 1.19
31+
go-version: "1.23.x"
3232

3333
- name: Lint
34-
uses: golangci/golangci-lint-action@v3
34+
uses: golangci/golangci-lint-action@v6
3535
with:
3636
args: --build-tags integration -p bugs -p unused --timeout=10m
3737

@@ -41,21 +41,23 @@ jobs:
4141

4242
steps:
4343
- name: Checkout
44-
uses: actions/checkout@v3
44+
uses: actions/checkout@v4
4545

46-
- name: Set up Go 1.19
47-
uses: actions/setup-go@v3
46+
- name: Set up Go 1.23
47+
uses: actions/setup-go@v5
4848
with:
49-
go-version: 1.19
49+
go-version: "1.23.x"
5050

5151
- name: Create k8s Kind Cluster
52-
uses: helm/kind-action@v1.5.0
52+
uses: helm/kind-action@v1.10.0
5353
with:
54+
version: v0.24.0
5455
install_only: true
5556

5657
- name: Test
5758
run: |
5859
make test
60+
make test-cleanup
5961
6062
build-platforms:
6163
name: Docker Build Platforms
@@ -69,25 +71,25 @@ jobs:
6971
steps:
7072
- name: Log in to the container registry
7173
if: ${{ env.DOCKER_REGISTRY_TOKEN != '' }}
72-
uses: docker/login-action@v2
74+
uses: docker/login-action@v3
7375
with:
7476
registry: ${{ env.REGISTRY }}
7577
username: ${{ secrets.DOCKER_REGISTRY_USER }}
7678
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }}
7779

7880
- name: Checkout
7981
if: ${{ env.DOCKER_REGISTRY_TOKEN != '' }}
80-
uses: actions/checkout@v3
82+
uses: actions/checkout@v4
8183

82-
- name: Set up Go 1.19
84+
- name: Set up Go 1.23
8385
if: ${{ env.DOCKER_REGISTRY_TOKEN != '' }}
84-
uses: actions/setup-go@v3
86+
uses: actions/setup-go@v5
8587
with:
86-
go-version: 1.19
88+
go-version: "1.23.x"
8789

8890
- name: Set up Docker Buildx
8991
if: ${{ env.DOCKER_REGISTRY_TOKEN != '' }}
90-
uses: docker/setup-buildx-action@v2
92+
uses: docker/setup-buildx-action@v3
9193

9294
- name: Make tag
9395
if: ${{ env.DOCKER_REGISTRY_TOKEN != '' }}
@@ -98,7 +100,7 @@ jobs:
98100
99101
- name: Build and push image
100102
if: ${{ env.DOCKER_REGISTRY_TOKEN != '' }}
101-
uses: docker/build-push-action@v3
103+
uses: docker/build-push-action@v6
102104
with:
103105
context: .
104106
push: true
@@ -107,7 +109,7 @@ jobs:
107109

108110
- name: Build and push provisioner image
109111
if: ${{ env.DOCKER_REGISTRY_TOKEN != '' }}
110-
uses: docker/build-push-action@v3
112+
uses: docker/build-push-action@v6
111113
with:
112114
context: .
113115
push: true

.github/workflows/release-drafter.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: release-drafter/release-drafter@v5
13+
- uses: release-drafter/release-drafter@v6
1414
env:
1515
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
FROM golang:1.19-alpine as builder
1+
FROM golang:1.23-alpine AS builder
22
RUN apk add make binutils git
33
COPY / /work
44
WORKDIR /work
55
RUN make lvmplugin
66

7-
FROM alpine:3.16
7+
FROM alpine:3.20
88
LABEL maintainers="Metal Authors"
99
LABEL description="LVM Driver"
1010

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ build-provisioner:
3131
docker build -t csi-driver-lvm-provisioner . -f cmd/provisioner/Dockerfile
3232

3333
/dev/loop%:
34-
@fallocate --length 1G loop$*.img
34+
@fallocate --length 2G loop$*.img
3535
ifndef GITHUB_ACTIONS
3636
@sudo mknod $@ b 7 $*
3737
endif
@@ -42,7 +42,7 @@ rm-loop%:
4242
@sudo losetup -d /dev/loop$* || true
4343
@! losetup /dev/loop$*
4444
@sudo rm -f /dev/loop$*
45-
@rm loop$*.img
45+
@rm -f loop$*.img
4646
# If removing this loop device fails, you may need to:
4747
# sudo dmsetup info
4848
# sudo dmsetup remove <DEVICE_NAME>
@@ -66,6 +66,7 @@ RERUN ?= 1
6666
.PHONY: test
6767
test: build-plugin build-provisioner /dev/loop100 /dev/loop101 kind
6868
@cd tests && docker build -t csi-bats . && cd -
69+
@touch $(KUBECONFIG)
6970
@for i in {1..$(RERUN)}; do \
7071
docker run -i$(DOCKER_TTY_ARG) \
7172
-e HELM_REPO=$(HELM_REPO) \
@@ -77,4 +78,4 @@ test: build-plugin build-provisioner /dev/loop100 /dev/loop101 kind
7778
done
7879

7980
.PHONY: test-cleanup
80-
test-cleanup: rm-loop100 rm-loop101 rm-kind
81+
test-cleanup: rm-kind

cmd/provisioner/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
FROM golang:1.19-alpine as builder
1+
FROM golang:1.23-alpine AS builder
22
RUN apk add make binutils
33
COPY / /work
44
WORKDIR /work
55
RUN make provisioner
66

7-
FROM alpine:3.16
7+
FROM alpine:3.20
88
LABEL maintainers="Metal Authors"
99
LABEL description="LVM Driver"
1010

11-
RUN apk add lvm2 lvm2-extra e2fsprogs e2fsprogs-extra smartmontools nvme-cli util-linux device-mapper
11+
RUN apk add lvm2 lvm2-extra e2fsprogs e2fsprogs-extra xfsprogs-extra smartmontools nvme-cli util-linux device-mapper
1212
COPY --from=builder /work/bin/csi-lvmplugin-provisioner /csi-lvmplugin-provisioner
1313
USER root
1414
ENTRYPOINT ["/csi-lvmplugin-provisioner"]

go.mod

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,57 @@
11
module github.com/metal-stack/csi-driver-lvm
22

3-
go 1.19
3+
go 1.23
44

55
require (
6-
github.com/container-storage-interface/spec v1.7.0
6+
github.com/container-storage-interface/spec v1.9.0
77
github.com/docker/go-units v0.5.0
8-
github.com/kubernetes-csi/csi-lib-utils v0.12.0
9-
github.com/urfave/cli/v2 v2.23.7
10-
golang.org/x/net v0.5.0
11-
golang.org/x/sys v0.4.0
12-
google.golang.org/grpc v1.53.0
13-
k8s.io/api v0.26.0
14-
k8s.io/apimachinery v0.26.0
15-
k8s.io/client-go v0.26.0
16-
k8s.io/klog/v2 v2.80.1
8+
github.com/kubernetes-csi/csi-lib-utils v0.19.0
9+
github.com/urfave/cli/v2 v2.27.4
10+
golang.org/x/net v0.28.0
11+
golang.org/x/sys v0.25.0
12+
google.golang.org/grpc v1.66.0
13+
k8s.io/api v0.31.0
14+
k8s.io/apimachinery v0.31.0
15+
k8s.io/client-go v0.31.0
16+
k8s.io/klog/v2 v2.130.1
1717
)
1818

1919
require (
20-
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
21-
github.com/davecgh/go-spew v1.1.1 // indirect
22-
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
23-
github.com/go-logr/logr v1.2.3 // indirect
24-
github.com/go-openapi/jsonpointer v0.19.6 // indirect
25-
github.com/go-openapi/jsonreference v0.20.1 // indirect
26-
github.com/go-openapi/swag v0.22.3 // indirect
20+
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
21+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
22+
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
23+
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
24+
github.com/go-logr/logr v1.4.2 // indirect
25+
github.com/go-openapi/jsonpointer v0.21.0 // indirect
26+
github.com/go-openapi/jsonreference v0.21.0 // indirect
27+
github.com/go-openapi/swag v0.23.0 // indirect
2728
github.com/gogo/protobuf v1.3.2 // indirect
28-
github.com/golang/protobuf v1.5.2 // indirect
29-
github.com/google/gnostic v0.5.7-v3refs // indirect
30-
github.com/google/go-cmp v0.5.9 // indirect
29+
github.com/golang/protobuf v1.5.4 // indirect
30+
github.com/google/gnostic-models v0.6.8 // indirect
31+
github.com/google/go-cmp v0.6.0 // indirect
3132
github.com/google/gofuzz v1.2.0 // indirect
33+
github.com/google/uuid v1.6.0 // indirect
3234
github.com/josharian/intern v1.0.0 // indirect
3335
github.com/json-iterator/go v1.1.12 // indirect
3436
github.com/mailru/easyjson v0.7.7 // indirect
3537
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
3638
github.com/modern-go/reflect2 v1.0.2 // indirect
3739
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
3840
github.com/russross/blackfriday/v2 v2.1.0 // indirect
39-
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
40-
golang.org/x/oauth2 v0.4.0 // indirect
41-
golang.org/x/term v0.4.0 // indirect
42-
golang.org/x/text v0.6.0 // indirect
43-
golang.org/x/time v0.3.0 // indirect
44-
google.golang.org/appengine v1.6.7 // indirect
45-
google.golang.org/genproto v0.0.0-20230119192704-9d59e20e5cd1 // indirect
46-
google.golang.org/protobuf v1.28.1 // indirect
41+
github.com/x448/float16 v0.8.4 // indirect
42+
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
43+
golang.org/x/oauth2 v0.23.0 // indirect
44+
golang.org/x/term v0.24.0 // indirect
45+
golang.org/x/text v0.18.0 // indirect
46+
golang.org/x/time v0.6.0 // indirect
47+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
48+
google.golang.org/protobuf v1.34.2 // indirect
4749
gopkg.in/inf.v0 v0.9.1 // indirect
4850
gopkg.in/yaml.v2 v2.4.0 // indirect
4951
gopkg.in/yaml.v3 v3.0.1 // indirect
50-
k8s.io/kube-openapi v0.0.0-20230118215034-64b6bb138190 // indirect
51-
k8s.io/utils v0.0.0-20230115233650-391b47cb4029 // indirect
52+
k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 // indirect
53+
k8s.io/utils v0.0.0-20240902221715-702e33fdd3c3 // indirect
5254
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
53-
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
54-
sigs.k8s.io/yaml v1.3.0 // indirect
55+
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
56+
sigs.k8s.io/yaml v1.4.0 // indirect
5557
)

0 commit comments

Comments
 (0)