Skip to content

Commit 94b4549

Browse files
committed
upgrade dependencies
Signed-off-by: Bala.FA <[email protected]>
1 parent c657af7 commit 94b4549

27 files changed

+298
-796
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: actions/checkout@v4
2121
- uses: actions/setup-go@v5
2222
with:
23-
go-version: 1.22.x
23+
go-version: 1.23.x
2424
check-latest: true
2525
- name: Set environment
2626
run: |

.github/workflows/functests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ jobs:
2020
timeout-minutes: 60
2121
strategy:
2222
matrix:
23-
kube-version: ['v1.20.15', 'v1.21.14', 'v1.22.17', 'v1.23.17', 'v1.24.17', 'v1.25.16', 'v1.26.15', 'v1.27.15', 'v1.28.11', 'v1.29.6', 'v1.30.2']
23+
kube-version: ['v1.20.15', 'v1.21.14', 'v1.22.17', 'v1.23.17', 'v1.24.17', 'v1.25.16', 'v1.26.15', 'v1.27.16', 'v1.28.14', 'v1.29.9', 'v1.30.5', 'v1.31.1']
2424
os: [ubuntu-20.04, ubuntu-22.04]
2525

2626
steps:
2727
- uses: actions/checkout@v4
2828
- uses: actions/setup-go@v5
2929
with:
30-
go-version: 1.22.x
30+
go-version: 1.23.x
3131
check-latest: true
3232

3333
- name: Install dependencies

.github/workflows/linters.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
- uses: actions/checkout@v4
2121
- uses: actions/setup-go@v5
2222
with:
23-
go-version: 1.22.x
23+
go-version: 1.23.x
2424
check-latest: true
2525
- uses: ludeeus/action-shellcheck@master
2626
- uses: golangci/golangci-lint-action@v6
2727
with:
28-
version: v1.59.1
28+
version: v1.61.0
2929
args: --config ./.golangci.yml --timeout=60m

.github/workflows/vulncheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Set up Go
2424
uses: actions/setup-go@v5
2525
with:
26-
go-version: 1.22.x
26+
go-version: 1.23.x
2727
check-latest: true
2828
- name: Install govulncheck
2929
run: go install golang.org/x/vuln/cmd/govulncheck@latest

.golangci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
linters-settings:
22
run:
3-
go: "1.22"
3+
go: "1.23"
44

55
misspell:
66
locale: US
@@ -26,8 +26,8 @@ linters:
2626
issues:
2727
exclude-use-default: false
2828
exclude:
29-
- should have a package comment
30-
- exitAfterDefer
29+
- should have a package comment
30+
- exitAfterDefer
3131

3232
service:
33-
golangci-lint-version: 1.59.1 # use the fixed version to not introduce new linters unexpectedly
33+
golangci-lint-version: 1.61.0 # use the fixed version to not introduce new linters unexpectedly

.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ release:
1717

1818
before:
1919
hooks:
20-
- go mod tidy -compat=1.22
20+
- go mod tidy -compat=1.23
2121
- go mod download
2222

2323
builds:

cmd/kubectl-directpv/discover.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ func showDevices(resultMap map[directpvtypes.NodeID][]types.Device) error {
152152
}
153153

154154
if writer.Length() == 0 || !foundAvailableDrive {
155-
eprintf(false, color.HiYellowString("No drives are available to initialize")+"\n")
155+
eprintf(false, "%v\n", color.HiYellowString("No drives are available to initialize"))
156156
return errDiscoveryFailed
157157
}
158158

@@ -218,7 +218,7 @@ func discoverMain(ctx context.Context) {
218218
eprintf(true, "discovery failed; %v\n", err)
219219
os.Exit(1)
220220
case <-ctx.Done():
221-
eprintf(true, ctx.Err().Error())
221+
eprintf(true, "%v", ctx.Err().Error())
222222
os.Exit(1)
223223
}
224224
}

cmd/kubectl-directpv/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,5 +126,5 @@ func eprintf(isErr bool, format string, args ...any) {
126126
}
127127

128128
func logFunc(log admin.LogMessage) {
129-
eprintf(log.Type == admin.ErrorLogType, log.FormattedMessage)
129+
eprintf(log.Type == admin.ErrorLogType, "%v", log.FormattedMessage)
130130
}

codegen.sh

Lines changed: 19 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,13 @@ export PATH="$PATH:$GOPATH/bin"
2525
# Must keep versions sorted.
2626
VERSIONS=(v1beta1)
2727

28-
function install_code_generator() {
29-
if [ ! -x "$GOPATH/bin/deepcopy-gen" ]; then
30-
go install -v k8s.io/code-generator/cmd/[email protected]
31-
fi
32-
33-
if [ ! -x "$GOPATH/bin/openapi-gen" ]; then
34-
go install -v k8s.io/code-generator/cmd/[email protected]
35-
fi
36-
37-
if [ ! -x "$GOPATH/bin/client-gen" ]; then
38-
go install -v k8s.io/code-generator/cmd/[email protected]
39-
fi
40-
41-
if [ ! -x "$GOPATH/bin/conversion-gen" ]; then
42-
go install -v k8s.io/code-generator/cmd/[email protected]
43-
fi
44-
}
45-
46-
function install_controller_tools() {
47-
if [ ! -x "$GOPATH/bin/controller-gen" ]; then
48-
go install -v sigs.k8s.io/controller-tools/cmd/[email protected]
49-
fi
50-
}
51-
52-
install_code_generator
53-
install_controller_tools
28+
echo "Installing code generators ..."
29+
go install -v \
30+
k8s.io/code-generator/cmd/[email protected] \
31+
k8s.io/code-generator/cmd/[email protected] \
32+
k8s.io/code-generator/cmd/[email protected]
33+
go install -v k8s.io/kube-openapi/cmd/[email protected]
34+
go install -v sigs.k8s.io/controller-tools/cmd/[email protected]
5435

5536
cd "$(dirname "$0")"
5637

@@ -80,16 +61,18 @@ input_dirs=$(IFS=,; echo "${arr[*]}")
8061
echo "Running deepcopy-gen ..."
8162
deepcopy-gen \
8263
--go-header-file boilerplate.go.txt \
83-
--input-dirs "${input_dirs}" \
84-
--output-package "${REPOSITORY}/pkg/"
64+
--output-file deepcopy_generated.go \
65+
"${input_dirs}"
8566

8667
echo "Running openapi-gen ..."
8768
for version in "${VERSIONS[@]}"; do
8869
repo="${REPOSITORY}/pkg/apis/directpv.min.io/${version}"
8970
openapi-gen \
9071
--go-header-file boilerplate.go.txt \
91-
--input-dirs "${repo}" \
92-
--output-package "${repo}"
72+
--output-file openapi_generated.go \
73+
--output-dir "pkg/apis/directpv.min.io/${version}" \
74+
--output-pkg "${repo}" \
75+
"${repo}"
9376
done
9477

9578
echo "Running client-gen ..."
@@ -99,12 +82,13 @@ arr=("${VERSIONS[@]/#/directpv.min.io/}")
9982
input_versions=$(IFS=,; echo "${arr[*]}")
10083
client-gen \
10184
--go-header-file boilerplate.go.txt \
102-
--input-dirs "${input_dirs}" \
103-
--output-package "${REPOSITORY}/pkg/" \
10485
--fake-clientset \
86+
--output-dir pkg \
87+
--output-pkg "${REPOSITORY}/pkg" \
10588
--clientset-name clientset \
10689
--input "${input_versions}" \
107-
--input-base "${REPOSITORY}/pkg/apis"
90+
--input-base "${REPOSITORY}/pkg/apis" \
91+
"${input_dirs}"
10892

10993
echo "Running controller-gen ..."
11094
controller-gen crd:crdVersions=v1 paths=./... output:dir=pkg/admin/installer
@@ -113,5 +97,5 @@ rm -f pkg/admin/installer/direct.csi.min.io_directcsidrives.yaml pkg/admin/insta
11397
echo "Running conversion-gen ..."
11498
conversion-gen \
11599
--go-header-file boilerplate.go.txt \
116-
--input-dirs "${VERSIONS[-1]/#/$REPOSITORY/pkg/apis/directpv.min.io/}" \
117-
--output-package "${REPOSITORY}/pkg/"
100+
--output-file zz_generated.conversion.go \
101+
"${VERSIONS[-1]/#/$REPOSITORY/pkg/apis/directpv.min.io/}"

go.mod

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
module github.com/minio/directpv
22

3-
go 1.22.0
3+
go 1.23.0
44

5-
toolchain go1.22.5
5+
toolchain go1.23.2
66

77
require (
8-
github.com/charmbracelet/bubbles v0.18.0
9-
github.com/charmbracelet/bubbletea v0.26.6
10-
github.com/charmbracelet/lipgloss v0.11.0
8+
github.com/charmbracelet/bubbles v0.20.0
9+
github.com/charmbracelet/bubbletea v1.1.1
10+
github.com/charmbracelet/lipgloss v0.13.0
1111
github.com/container-storage-interface/spec v1.10.0
1212
github.com/dustin/go-humanize v1.0.1
1313
github.com/fatih/color v1.17.0
1414
github.com/freddierice/go-losetup/v2 v2.0.1
1515
github.com/google/uuid v1.6.0
1616
github.com/jedib0t/go-pretty/v6 v6.5.9
17-
github.com/kubernetes-csi/csi-lib-utils v0.18.1
17+
github.com/kubernetes-csi/csi-lib-utils v0.19.0
1818
github.com/minio/sha256-simd v1.0.1
1919
github.com/mitchellh/go-homedir v1.1.0
20-
github.com/prometheus/client_golang v1.19.1
20+
github.com/prometheus/client_golang v1.20.4
2121
github.com/prometheus/client_model v0.6.1
2222
github.com/spf13/cobra v1.8.1
2323
github.com/spf13/viper v1.19.0
24-
golang.org/x/time v0.5.0
25-
google.golang.org/grpc v1.65.0
24+
golang.org/x/time v0.6.0
25+
google.golang.org/grpc v1.67.0
2626
gopkg.in/yaml.v3 v3.0.1
27-
k8s.io/api v0.30.3
28-
k8s.io/apiextensions-apiserver v0.30.3
29-
k8s.io/apimachinery v0.30.3
30-
k8s.io/client-go v0.30.3
27+
k8s.io/api v0.31.1
28+
k8s.io/apiextensions-apiserver v0.31.1
29+
k8s.io/apimachinery v0.31.1
30+
k8s.io/client-go v0.31.1
3131
k8s.io/klog/v2 v2.130.1
32-
k8s.io/kube-openapi v0.0.0-20240709000822-3c01b740850f
33-
k8s.io/pod-security-admission v0.30.3
32+
k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38
33+
k8s.io/pod-security-admission v0.31.1
3434
sigs.k8s.io/yaml v1.4.0
3535
)
3636

@@ -39,74 +39,73 @@ require (
3939
github.com/beorn7/perks v1.0.1 // indirect
4040
github.com/cespare/xxhash/v2 v2.3.0 // indirect
4141
github.com/charmbracelet/harmonica v0.2.0 // indirect
42-
github.com/charmbracelet/x/ansi v0.1.2 // indirect
43-
github.com/charmbracelet/x/input v0.1.2 // indirect
44-
github.com/charmbracelet/x/term v0.1.1 // indirect
45-
github.com/charmbracelet/x/windows v0.1.2 // indirect
42+
github.com/charmbracelet/x/ansi v0.3.2 // indirect
43+
github.com/charmbracelet/x/term v0.2.0 // indirect
4644
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
4745
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
4846
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
49-
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
5047
github.com/fsnotify/fsnotify v1.7.0 // indirect
48+
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
5149
github.com/go-logr/logr v1.4.2 // indirect
5250
github.com/go-openapi/jsonpointer v0.21.0 // indirect
5351
github.com/go-openapi/jsonreference v0.21.0 // indirect
5452
github.com/go-openapi/swag v0.23.0 // indirect
5553
github.com/gogo/protobuf v1.3.2 // indirect
5654
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
5755
github.com/golang/protobuf v1.5.4 // indirect
58-
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
56+
github.com/google/gnostic-models v0.6.8 // indirect
5957
github.com/google/go-cmp v0.6.0 // indirect
6058
github.com/google/gofuzz v1.2.0 // indirect
6159
github.com/hashicorp/hcl v1.0.0 // indirect
6260
github.com/imdario/mergo v0.3.16 // indirect
6361
github.com/inconshreveable/mousetrap v1.1.0 // indirect
6462
github.com/josharian/intern v1.0.0 // indirect
6563
github.com/json-iterator/go v1.1.12 // indirect
64+
github.com/klauspost/compress v1.17.10 // indirect
6665
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
6766
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
6867
github.com/magiconair/properties v1.8.7 // indirect
6968
github.com/mailru/easyjson v0.7.7 // indirect
7069
github.com/mattn/go-colorable v0.1.13 // indirect
7170
github.com/mattn/go-isatty v0.0.20 // indirect
7271
github.com/mattn/go-localereader v0.0.1 // indirect
73-
github.com/mattn/go-runewidth v0.0.15 // indirect
72+
github.com/mattn/go-runewidth v0.0.16 // indirect
7473
github.com/mitchellh/mapstructure v1.5.0 // indirect
7574
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
7675
github.com/modern-go/reflect2 v1.0.2 // indirect
7776
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
7877
github.com/muesli/cancelreader v0.2.2 // indirect
79-
github.com/muesli/reflow v0.3.0 // indirect
8078
github.com/muesli/termenv v0.15.2 // indirect
8179
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
82-
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
80+
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
8381
github.com/pkg/errors v0.9.1 // indirect
84-
github.com/prometheus/common v0.54.0 // indirect
82+
github.com/prometheus/common v0.59.1 // indirect
8583
github.com/prometheus/procfs v0.15.1 // indirect
8684
github.com/rivo/uniseg v0.4.7 // indirect
8785
github.com/sagikazarmark/locafero v0.6.0 // indirect
8886
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
8987
github.com/sourcegraph/conc v0.3.0 // indirect
9088
github.com/spf13/afero v1.11.0 // indirect
91-
github.com/spf13/cast v1.6.0 // indirect
89+
github.com/spf13/cast v1.7.0 // indirect
9290
github.com/spf13/pflag v1.0.5 // indirect
9391
github.com/subosito/gotenv v1.6.0 // indirect
94-
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
92+
github.com/x448/float16 v0.8.4 // indirect
9593
go.uber.org/multierr v1.11.0 // indirect
96-
golang.org/x/exp v0.0.0-20240707233637-46b078467d37 // indirect
97-
golang.org/x/net v0.27.0 // indirect
98-
golang.org/x/oauth2 v0.21.0 // indirect
99-
golang.org/x/sync v0.7.0 // indirect
100-
golang.org/x/sys v0.22.0 // indirect
101-
golang.org/x/term v0.22.0 // indirect
102-
golang.org/x/text v0.16.0 // indirect
103-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240708141625-4ad9e859172b // indirect
94+
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
95+
golang.org/x/net v0.29.0 // indirect
96+
golang.org/x/oauth2 v0.23.0 // indirect
97+
golang.org/x/sync v0.8.0 // indirect
98+
golang.org/x/sys v0.25.0 // indirect
99+
golang.org/x/term v0.24.0 // indirect
100+
golang.org/x/text v0.18.0 // indirect
101+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f // indirect
104102
google.golang.org/protobuf v1.34.2 // indirect
103+
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
105104
gopkg.in/inf.v0 v0.9.1 // indirect
106105
gopkg.in/ini.v1 v1.67.0 // indirect
107106
gopkg.in/yaml.v2 v2.4.0 // indirect
108-
k8s.io/component-base v0.30.3 // indirect
109-
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect
107+
k8s.io/component-base v0.31.1 // indirect
108+
k8s.io/utils v0.0.0-20240921022957-49e7df575cb6 // indirect
110109
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
111110
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
112111
)

0 commit comments

Comments
 (0)