Skip to content

Commit 7e08cff

Browse files
upgrade karmada dependency to v1.14
Signed-off-by: changzhen <[email protected]>
1 parent 69ba4b7 commit 7e08cff

File tree

8 files changed

+220
-183
lines changed

8 files changed

+220
-183
lines changed

.golangci.yml

Lines changed: 88 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
11
# This files contains all configuration options for analysis running.
22
# More details please refer to: https://golangci-lint.run/usage/configuration/
33

4+
version: "2"
45
run:
5-
# timeout for analysis, e.g. 30s, 5m, default is 1m
6+
# timeout for analysis, e.g. 30s, 5m, default timeout is disabled
67
timeout: 10m
78

8-
# which dirs to skip: issues from them won't be reported;
9-
# can use regexp here: generated.*, regexp is applied on full path;
10-
# default value is empty list, but default dirs are skipped independently
11-
# from this option's value (see skip-dirs-use-default).
12-
# "/" will be replaced by current OS file path separator to properly work
13-
# on Windows.
14-
skip-dirs:
15-
- (^|/)vendor($|/)
16-
17-
# default is true. Enables skipping of directories:
18-
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
19-
skip-dirs-use-default: false
20-
219
# One of 'readonly' and 'vendor'.
2210
# - readonly: the go command is disallowed from the implicit automatic updating of go.mod described above.
2311
# Instead, it fails when any changes to go.mod are needed. This setting is most useful to check
@@ -27,42 +15,89 @@ run:
2715
modules-download-mode: readonly
2816
linters:
2917
enable:
30-
# linters maintained by golang.org
31-
- gofmt
32-
- goimports
33-
- govet
34-
# linters default enabled by golangci-lint .
35-
- errcheck
36-
- gosimple
37-
- ineffassign
38-
- staticcheck
39-
- typecheck
40-
- unused
41-
# other linters supported by golangci-lint.
42-
- gci
43-
- gocyclo
44-
- gosec
45-
- misspell
46-
- whitespace
47-
- revive
48-
49-
linters-settings:
50-
goimports:
51-
local-prefixes: github.com/karmada-io/multicluster-cloud-provider
52-
gocyclo:
53-
# minimal cyclomatic complexity to report
54-
min-complexity: 15
55-
gci:
56-
sections:
57-
- Standard
58-
- Default
59-
- Prefix(github.com/karmada-io/multicluster-cloud-provider)
60-
61-
issues:
62-
# The list of ids of default excludes to include or disable. By default it's empty.
63-
include:
64-
# disable excluding of issues about comments from revive
65-
# see https://golangci-lint.run/usage/configuration/#command-line-options for more info
66-
- EXC0012
67-
- EXC0013
68-
- EXC0014
18+
- depguard
19+
- gocyclo
20+
- gosec
21+
- misspell
22+
- revive
23+
- whitespace
24+
settings:
25+
depguard:
26+
rules:
27+
main:
28+
deny:
29+
- pkg: io/ioutil
30+
desc: 'replaced by io and os packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil'
31+
gocyclo:
32+
# minimal cyclomatic complexity to report
33+
min-complexity: 15
34+
revive:
35+
rules:
36+
# Disable if-return as it is too strict and not always useful.
37+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#if-return
38+
- name: if-return
39+
disabled: true
40+
# Disable package-comments for now since most packages in this project are primarily for internal use.
41+
# If we decide to provide public packages in the future, we can move them to a separate
42+
# repository and revisit adding package-level comments at that time.
43+
- name: package-comments
44+
disabled: true
45+
- name: superfluous-else
46+
arguments:
47+
- preserveScope
48+
- name: error-strings
49+
- name: error-return
50+
- name: receiver-naming
51+
- name: increment-decrement
52+
- name: range
53+
- name: error-naming
54+
- name: dot-imports
55+
- name: errorf
56+
- name: exported
57+
- name: var-declaration
58+
- name: blank-imports
59+
- name: indent-error-flow
60+
- name: unreachable-code
61+
- name: var-naming
62+
- name: redefines-builtin-id
63+
- name: unused-parameter
64+
- name: context-as-argument
65+
- name: context-keys-type
66+
- name: unexported-return
67+
- name: time-naming
68+
- name: empty-block
69+
staticcheck:
70+
checks:
71+
- all
72+
# Disable QF1008 to retain embedded fields for better readability.
73+
- "-QF1008"
74+
# Disable ST1000 (staticcheck) for now since most packages in this project are primarily for internal use.
75+
# If we decide to provide public packages in the future, we can move them to a separate
76+
# repository and revisit adding package-level comments at that time.
77+
- "-ST1000"
78+
exclusions:
79+
generated: lax
80+
presets:
81+
- common-false-positives
82+
- legacy
83+
- std-error-handling
84+
paths:
85+
- (^|/)vendor($|/)
86+
formatters:
87+
enable:
88+
- gci
89+
- gofmt
90+
- goimports
91+
settings:
92+
gci:
93+
sections:
94+
- Standard
95+
- Default
96+
- Prefix(github.com/karmada-io/multicluster-cloud-provider)
97+
goimports:
98+
local-prefixes:
99+
- github.com/karmada-io/multicluster-cloud-provider
100+
exclusions:
101+
generated: lax
102+
paths:
103+
- (^|/)vendor($|/)

app/manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func setupControllers(ctx context.Context, mgr controllerruntime.Manager, cloudP
154154
restConfig := mgr.GetConfig()
155155
dynamicClientSet := dynamic.NewForConfigOrDie(restConfig)
156156

157-
controlPlaneInformerManager := genericmanager.NewSingleClusterInformerManager(dynamicClientSet, 0, ctx.Done())
157+
controlPlaneInformerManager := genericmanager.NewSingleClusterInformerManager(ctx, dynamicClientSet, 0)
158158

159159
setupIndexesForMCI(ctx, mgr.GetFieldIndexer())
160160

fake/regist.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
)
88

99
func init() {
10-
multiclusterprovider.RegisterMultiClusterProvider(defaultProviderName, func(config io.Reader) (multiclusterprovider.Interface, error) {
10+
multiclusterprovider.RegisterMultiClusterProvider(defaultProviderName, func(_ io.Reader) (multiclusterprovider.Interface, error) {
1111
return &Provider{Name: defaultProviderName}, nil
1212
})
1313
}

go.mod

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,90 @@
11
module github.com/karmada-io/multicluster-cloud-provider
22

3-
go 1.22.12
3+
go 1.23.8
44

55
require (
6-
github.com/karmada-io/karmada v1.13.0
6+
github.com/karmada-io/karmada v1.14.0
77
github.com/pkg/errors v0.9.1
88
github.com/spf13/cobra v1.8.1
9-
github.com/spf13/pflag v1.0.5
10-
k8s.io/api v0.31.3
11-
k8s.io/apimachinery v0.31.3
12-
k8s.io/client-go v0.31.3
13-
k8s.io/component-base v0.31.3
9+
github.com/spf13/pflag v1.0.6
10+
k8s.io/api v0.32.3
11+
k8s.io/apimachinery v0.32.3
12+
k8s.io/client-go v0.32.3
13+
k8s.io/component-base v0.32.3
1414
k8s.io/klog/v2 v2.130.1
15-
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
16-
sigs.k8s.io/controller-runtime v0.19.1
15+
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738
16+
sigs.k8s.io/controller-runtime v0.20.4
1717
sigs.k8s.io/mcs-api v0.1.0
1818
)
1919

2020
require (
21-
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
21+
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
2222
github.com/MakeNowJust/heredoc v1.0.0 // indirect
2323
github.com/beorn7/perks v1.0.1 // indirect
2424
github.com/blang/semver/v4 v4.0.0 // indirect
2525
github.com/cespare/xxhash/v2 v2.3.0 // indirect
2626
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
2727
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
28-
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
29-
github.com/fsnotify/fsnotify v1.7.0 // indirect
28+
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
29+
github.com/fsnotify/fsnotify v1.8.0 // indirect
3030
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
3131
github.com/go-logr/logr v1.4.2 // indirect
3232
github.com/go-logr/zapr v1.3.0 // indirect
33-
github.com/go-openapi/jsonpointer v0.20.2 // indirect
33+
github.com/go-openapi/jsonpointer v0.21.0 // indirect
3434
github.com/go-openapi/jsonreference v0.20.4 // indirect
35-
github.com/go-openapi/swag v0.22.9 // indirect
35+
github.com/go-openapi/swag v0.23.0 // indirect
3636
github.com/gogo/protobuf v1.3.2 // indirect
37-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
3837
github.com/golang/protobuf v1.5.4 // indirect
38+
github.com/google/btree v1.1.3 // indirect
3939
github.com/google/gnostic-models v0.6.8 // indirect
4040
github.com/google/go-cmp v0.6.0 // indirect
4141
github.com/google/gofuzz v1.2.0 // indirect
4242
github.com/google/uuid v1.6.0 // indirect
4343
github.com/gorilla/websocket v1.5.0 // indirect
44-
github.com/imdario/mergo v0.3.16 // indirect
4544
github.com/inconshreveable/mousetrap v1.1.0 // indirect
4645
github.com/josharian/intern v1.0.0 // indirect
4746
github.com/json-iterator/go v1.1.12 // indirect
47+
github.com/klauspost/compress v1.17.9 // indirect
4848
github.com/kr/pretty v0.3.1 // indirect
4949
github.com/kr/text v0.2.0 // indirect
5050
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
5151
github.com/mailru/easyjson v0.7.7 // indirect
5252
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
53-
github.com/moby/spdystream v0.4.0 // indirect
53+
github.com/moby/spdystream v0.5.0 // indirect
5454
github.com/moby/term v0.5.0 // indirect
5555
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
5656
github.com/modern-go/reflect2 v1.0.2 // indirect
5757
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
5858
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
59-
github.com/prometheus/client_golang v1.19.1 // indirect
59+
github.com/prometheus/client_golang v1.20.5 // indirect
6060
github.com/prometheus/client_model v0.6.1 // indirect
61-
github.com/prometheus/common v0.55.0 // indirect
61+
github.com/prometheus/common v0.57.0 // indirect
6262
github.com/prometheus/procfs v0.15.1 // indirect
6363
github.com/rogpeppe/go-internal v1.12.0 // indirect
6464
github.com/russross/blackfriday/v2 v2.1.0 // indirect
6565
github.com/x448/float16 v0.8.4 // indirect
66+
go.opentelemetry.io/otel v1.29.0 // indirect
67+
go.opentelemetry.io/otel/trace v1.29.0 // indirect
6668
go.uber.org/multierr v1.11.0 // indirect
67-
go.uber.org/zap v1.26.0 // indirect
68-
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
69-
golang.org/x/net v0.34.0 // indirect
70-
golang.org/x/oauth2 v0.21.0 // indirect
71-
golang.org/x/sys v0.29.0 // indirect
72-
golang.org/x/term v0.28.0 // indirect
73-
golang.org/x/text v0.21.0 // indirect
74-
golang.org/x/time v0.5.0 // indirect
69+
go.uber.org/zap v1.27.0 // indirect
70+
golang.org/x/net v0.39.0 // indirect
71+
golang.org/x/oauth2 v0.25.0 // indirect
72+
golang.org/x/sync v0.13.0 // indirect
73+
golang.org/x/sys v0.32.0 // indirect
74+
golang.org/x/term v0.31.0 // indirect
75+
golang.org/x/text v0.24.0 // indirect
76+
golang.org/x/time v0.8.0 // indirect
7577
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
76-
google.golang.org/protobuf v1.34.2 // indirect
78+
google.golang.org/protobuf v1.36.1 // indirect
79+
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
7780
gopkg.in/inf.v0 v0.9.1 // indirect
78-
gopkg.in/yaml.v2 v2.4.0 // indirect
7981
gopkg.in/yaml.v3 v3.0.1 // indirect
80-
k8s.io/apiextensions-apiserver v0.31.3 // indirect
81-
k8s.io/apiserver v0.31.3 // indirect
82-
k8s.io/cli-runtime v0.31.3 // indirect
83-
k8s.io/kube-openapi v0.0.0-20240430033511-f0e62f92d13f // indirect
84-
k8s.io/kubectl v0.31.3 // indirect
82+
k8s.io/apiextensions-apiserver v0.32.3 // indirect
83+
k8s.io/cli-runtime v0.32.3 // indirect
84+
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect
85+
k8s.io/kubectl v0.32.3 // indirect
8586
sigs.k8s.io/cluster-api v1.7.1 // indirect
86-
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
87-
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
87+
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
88+
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect
8889
sigs.k8s.io/yaml v1.4.0 // indirect
8990
)

0 commit comments

Comments
 (0)