Skip to content

Commit

Permalink
Update to go-1.23 (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 committed Sep 13, 2024
1 parent c5a5b28 commit 29d988d
Show file tree
Hide file tree
Showing 21 changed files with 246 additions and 346 deletions.
71 changes: 0 additions & 71 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

38 changes: 20 additions & 18 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go 1.19
uses: actions/setup-go@v3
- name: Set up Go 1.23
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: "1.23.x"

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

Expand All @@ -41,21 +41,23 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go 1.19
uses: actions/setup-go@v3
- name: Set up Go 1.23
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: "1.23.x"

- name: Create k8s Kind Cluster
uses: helm/kind-action@v1.5.0
uses: helm/kind-action@v1.10.0
with:
version: v0.24.0
install_only: true

- name: Test
run: |
make test
make test-cleanup
build-platforms:
name: Docker Build Platforms
Expand All @@ -69,25 +71,25 @@ jobs:
steps:
- name: Log in to the container registry
if: ${{ env.DOCKER_REGISTRY_TOKEN != '' }}
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKER_REGISTRY_USER }}
password: ${{ secrets.DOCKER_REGISTRY_TOKEN }}

- name: Checkout
if: ${{ env.DOCKER_REGISTRY_TOKEN != '' }}
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go 1.19
- name: Set up Go 1.23
if: ${{ env.DOCKER_REGISTRY_TOKEN != '' }}
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: "1.23.x"

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

- name: Make tag
if: ${{ env.DOCKER_REGISTRY_TOKEN != '' }}
Expand All @@ -98,7 +100,7 @@ jobs:
- name: Build and push image
if: ${{ env.DOCKER_REGISTRY_TOKEN != '' }}
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: .
push: true
Expand All @@ -107,7 +109,7 @@ jobs:

- name: Build and push provisioner image
if: ${{ env.DOCKER_REGISTRY_TOKEN != '' }}
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
context: .
push: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM golang:1.19-alpine as builder
FROM golang:1.23-alpine AS builder
RUN apk add make binutils git
COPY / /work
WORKDIR /work
RUN make lvmplugin

FROM alpine:3.16
FROM alpine:3.20
LABEL maintainers="Metal Authors"
LABEL description="LVM Driver"

Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ build-provisioner:
docker build -t csi-driver-lvm-provisioner . -f cmd/provisioner/Dockerfile

/dev/loop%:
@fallocate --length 1G loop$*.img
@fallocate --length 2G loop$*.img
ifndef GITHUB_ACTIONS
@sudo mknod $@ b 7 $*
endif
Expand All @@ -42,7 +42,7 @@ rm-loop%:
@sudo losetup -d /dev/loop$* || true
@! losetup /dev/loop$*
@sudo rm -f /dev/loop$*
@rm loop$*.img
@rm -f loop$*.img
# If removing this loop device fails, you may need to:
# sudo dmsetup info
# sudo dmsetup remove <DEVICE_NAME>
Expand All @@ -66,6 +66,7 @@ RERUN ?= 1
.PHONY: test
test: build-plugin build-provisioner /dev/loop100 /dev/loop101 kind
@cd tests && docker build -t csi-bats . && cd -
@touch $(KUBECONFIG)
@for i in {1..$(RERUN)}; do \
docker run -i$(DOCKER_TTY_ARG) \
-e HELM_REPO=$(HELM_REPO) \
Expand All @@ -77,4 +78,4 @@ test: build-plugin build-provisioner /dev/loop100 /dev/loop101 kind
done

.PHONY: test-cleanup
test-cleanup: rm-loop100 rm-loop101 rm-kind
test-cleanup: rm-kind
6 changes: 3 additions & 3 deletions cmd/provisioner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM golang:1.19-alpine as builder
FROM golang:1.23-alpine AS builder
RUN apk add make binutils
COPY / /work
WORKDIR /work
RUN make provisioner

FROM alpine:3.16
FROM alpine:3.20
LABEL maintainers="Metal Authors"
LABEL description="LVM Driver"

RUN apk add lvm2 lvm2-extra e2fsprogs e2fsprogs-extra smartmontools nvme-cli util-linux device-mapper
RUN apk add lvm2 lvm2-extra e2fsprogs e2fsprogs-extra xfsprogs-extra smartmontools nvme-cli util-linux device-mapper
COPY --from=builder /work/bin/csi-lvmplugin-provisioner /csi-lvmplugin-provisioner
USER root
ENTRYPOINT ["/csi-lvmplugin-provisioner"]
68 changes: 35 additions & 33 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,55 +1,57 @@
module github.com/metal-stack/csi-driver-lvm

go 1.19
go 1.23

require (
github.com/container-storage-interface/spec v1.7.0
github.com/container-storage-interface/spec v1.9.0
github.com/docker/go-units v0.5.0
github.com/kubernetes-csi/csi-lib-utils v0.12.0
github.com/urfave/cli/v2 v2.23.7
golang.org/x/net v0.5.0
golang.org/x/sys v0.4.0
google.golang.org/grpc v1.53.0
k8s.io/api v0.26.0
k8s.io/apimachinery v0.26.0
k8s.io/client-go v0.26.0
k8s.io/klog/v2 v2.80.1
github.com/kubernetes-csi/csi-lib-utils v0.19.0
github.com/urfave/cli/v2 v2.27.4
golang.org/x/net v0.28.0
golang.org/x/sys v0.25.0
google.golang.org/grpc v1.66.0
k8s.io/api v0.31.0
k8s.io/apimachinery v0.31.0
k8s.io/client-go v0.31.0
k8s.io/klog/v2 v2.130.1
)

require (
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.1 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
golang.org/x/oauth2 v0.4.0 // indirect
golang.org/x/term v0.4.0 // indirect
golang.org/x/text v0.6.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230119192704-9d59e20e5cd1 // indirect
google.golang.org/protobuf v1.28.1 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect
golang.org/x/oauth2 v0.23.0 // indirect
golang.org/x/term v0.24.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/time v0.6.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/kube-openapi v0.0.0-20230118215034-64b6bb138190 // indirect
k8s.io/utils v0.0.0-20230115233650-391b47cb4029 // indirect
k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 // indirect
k8s.io/utils v0.0.0-20240902221715-702e33fdd3c3 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
Loading

0 comments on commit 29d988d

Please sign in to comment.