Skip to content

Commit d1062da

Browse files
authored
Update for release [email protected] (#72)
ProductLine: ACE Release: v2025.12.15 Signed-off-by: 1gtm <[email protected]> Signed-off-by: Tamal Saha <[email protected]>
1 parent 10de2e6 commit d1062da

File tree

341 files changed

+34744
-14236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

341 files changed

+34744
-14236
lines changed

.golangci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: "2"
2+
linters:
3+
default: standard
4+
enable:
5+
- unparam
6+
7+
formatters:
8+
enable:
9+
- gofmt
10+
- goimports
11+
settings:
12+
gofmt:
13+
rewrite-rules:
14+
- pattern: 'interface{}'
15+
replacement: 'any'
16+
17+
issues:
18+
max-same-issues: 100
19+
20+
exclude-files:
21+
- generated.*\\.go
22+
23+
exclude-dirs:
24+
- client
25+
- vendor
26+
27+
run:
28+
timeout: 10m

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,6 @@ unit-tests: $(BUILD_DIRS)
199199
./hack/test.sh $(SRC_PKGS) \
200200
"
201201

202-
ADDTL_LINTERS := gofmt,goimports,unparam
203-
204202
.PHONY: lint
205203
lint: $(BUILD_DIRS)
206204
@echo "running linter"
@@ -218,7 +216,7 @@ lint: $(BUILD_DIRS)
218216
--env GO111MODULE=on \
219217
--env GOFLAGS="-mod=vendor" \
220218
$(BUILD_IMAGE) \
221-
golangci-lint run --enable $(ADDTL_LINTERS) --timeout=10m --exclude-files="generated.*\.go$\" --exclude-dirs-use-default
219+
golangci-lint run
222220

223221
$(BUILD_DIRS):
224222
@mkdir -p $@

go.mod

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ require (
1515
k8s.io/component-base v0.32.8
1616
k8s.io/klog/v2 v2.130.1
1717
k8s.io/kubectl v0.29.2
18-
kmodules.xyz/client-go v0.32.10
19-
kmodules.xyz/resource-metadata v0.39.0
18+
kmodules.xyz/client-go v0.32.11
19+
kmodules.xyz/resource-metadata v0.40.0
2020
kmodules.xyz/resource-validator v0.29.1
21-
kubedb.dev/installer v0.17.2-0.20251209111747-44a50f5c5b61
21+
kubedb.dev/installer v0.17.2-0.20251214180945-b48a74dab69c
2222
kubevault.dev/installer v0.4.0-beta.0.0.20251015172606-30118eb2655f
2323
sigs.k8s.io/controller-runtime v0.20.4
2424
stash.appscode.dev/installer v0.12.2-0.20251204172259-c724502d3955
@@ -173,5 +173,3 @@ require (
173173
)
174174

175175
replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.6
176-
177-
replace k8s.io/kubernetes => github.com/kmodules/kubernetes v1.30.0-alpha.0.0.20231224075822-3bd9a13c86db

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -821,20 +821,20 @@ k8s.io/utils v0.0.0-20241210054802-24370beab758 h1:sdbE21q2nlQtFh65saZY+rRM6x6aJ
821821
k8s.io/utils v0.0.0-20241210054802-24370beab758/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
822822
kmodules.xyz/apiversion v0.2.0 h1:vAQYqZFm4xu4pbB1cAdHbFEPES6EQkcR4wc06xdTOWk=
823823
kmodules.xyz/apiversion v0.2.0/go.mod h1:oPX8g8LvlPdPX3Yc5YvCzJHQnw3YF/X4/jdW0b1am80=
824-
kmodules.xyz/client-go v0.32.10 h1:O/UKeU6Xc4scQG80DYw1HI8DYskyp1KsCEShIx3+T54=
825-
kmodules.xyz/client-go v0.32.10/go.mod h1:4k+da95l/Idg7k0+qc5qZCJJoAF6IQK5x0Fa+hBVD+Q=
824+
kmodules.xyz/client-go v0.32.11 h1:AbvsutYyCfCGgreMOx5ghdZto0ltKfhS/6n98TkXTGc=
825+
kmodules.xyz/client-go v0.32.11/go.mod h1:4k+da95l/Idg7k0+qc5qZCJJoAF6IQK5x0Fa+hBVD+Q=
826826
kmodules.xyz/go-containerregistry v0.0.14 h1:8MgLFa74HymAJEyjH7fyQJn5u2Ok6qPPFQX8ARfcXp0=
827827
kmodules.xyz/go-containerregistry v0.0.14/go.mod h1:xz0iGC3noyMi5NNAzXWTH6KqfiIgFWZAomw+U2zVOXs=
828828
kmodules.xyz/offshoot-api v0.32.0 h1:gogc5scSZe2JoXtZof72UGRl3Tit0kFaFRMkLLT1D8o=
829829
kmodules.xyz/offshoot-api v0.32.0/go.mod h1:tled7OxYZ3SkUJcrVFVVYyd+zXjsRSEm1R6Q3k4gcx0=
830-
kmodules.xyz/resource-metadata v0.39.0 h1:/UPaZFTN7x0cKzR6YUZ8RaouY/YSIekGbHlZsjzlsDg=
831-
kmodules.xyz/resource-metadata v0.39.0/go.mod h1:rwXNC2Byb0m0XJv9PxSxPJwMM6OdU+6uOidUCHu74zU=
830+
kmodules.xyz/resource-metadata v0.40.0 h1:OjPj9yXwf0nE536GQleOzv2LrnZp3ubykq8pGCiee6U=
831+
kmodules.xyz/resource-metadata v0.40.0/go.mod h1:jbB6cZBUFm4GGAn1q812/YSod4EwVOqzJH7DEpea4+Y=
832832
kmodules.xyz/resource-metrics v0.30.11 h1:dzxFhgpcDQFZ1wzy82j+22vo9MSqoVAtIGcutTRYgDo=
833833
kmodules.xyz/resource-metrics v0.30.11/go.mod h1:5K+0A0iU+4JBFPZEuj716/oSgI9xUTnVTANS+cwhHIs=
834834
kmodules.xyz/resource-validator v0.29.1 h1:URCzZ/SPtMcHmeS2iXF3bJ/Z1lzD6eldO2xZ7xoP2xU=
835835
kmodules.xyz/resource-validator v0.29.1/go.mod h1:g5Xysfd0tf8mJd1TJy3r1msbA95i1PC2tUAWlMzfiVE=
836-
kubedb.dev/installer v0.17.2-0.20251209111747-44a50f5c5b61 h1:DTXFtrFMrrwClYgHWGi3iViga5K0+QC1kAlr9/sQ0CE=
837-
kubedb.dev/installer v0.17.2-0.20251209111747-44a50f5c5b61/go.mod h1:yOBGU4/DyQJIMkWy1ImpB1TyZ9tqktMneXzzT9fLHQw=
836+
kubedb.dev/installer v0.17.2-0.20251214180945-b48a74dab69c h1:pP7kycOp5Z7Hy0h0ZCsxywdjX+NRURfNXzbBCZbuILM=
837+
kubedb.dev/installer v0.17.2-0.20251214180945-b48a74dab69c/go.mod h1:tmyy7oLgwrNrOEy7UluZVhaGWkVwNYUrAJd/2NOgKJI=
838838
kubevault.dev/installer v0.4.0-beta.0.0.20251015172606-30118eb2655f h1:x/ip0crnqPE/aq3EFHcShswXHSlVDMh30z9kJqh0aAY=
839839
kubevault.dev/installer v0.4.0-beta.0.0.20251015172606-30118eb2655f/go.mod h1:9pw0YFMZs5IyJf24D+LIh2PBoDnuLW3IOyE4BqUfgoU=
840840
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=

main.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import (
3535
"github.com/spf13/cobra"
3636
"github.com/yuin/goldmark"
3737
"github.com/yuin/goldmark/ast"
38-
gast "github.com/yuin/goldmark/ast"
3938
"github.com/yuin/goldmark/extension"
4039
"github.com/yuin/goldmark/parser"
4140
"github.com/yuin/goldmark/renderer"
@@ -207,7 +206,7 @@ func (r *CodeExtractor) RegisterFuncs(reg renderer.NodeRendererFuncRegisterer) {
207206
reg.Register(ast.KindFencedCodeBlock, r.extractCode)
208207
}
209208

210-
func (r *CodeExtractor) extractCode(_ util.BufWriter, source []byte, n gast.Node, entering bool) (gast.WalkStatus, error) {
209+
func (r *CodeExtractor) extractCode(_ util.BufWriter, source []byte, n ast.Node, entering bool) (ast.WalkStatus, error) {
211210
if entering {
212211
var buf bytes.Buffer
213212
l := n.Lines().Len()
@@ -332,7 +331,8 @@ func checkObject(ri p.ResourceInfo) error {
332331
}
333332
}
334333

335-
if gvr.Group == "kubedb.com" {
334+
switch gvr.Group {
335+
case "kubedb.com":
336336
dbVersion, _, err := unstructured.NestedString(obj.Object, "spec", "version")
337337
if err != nil {
338338
logger.Log(err)
@@ -346,7 +346,7 @@ func checkObject(ri p.ResourceInfo) error {
346346
logger.Log(fmt.Errorf("using unknown %s version %s", obj.GetKind(), dbVersion))
347347
return nil
348348
}
349-
} else if gvr.Group == "catalog.kubedb.com" {
349+
case "catalog.kubedb.com":
350350
if !sets.NewString(kubedbcatalog.ActiveDBVersions()[strings.TrimSuffix(obj.GetKind(), "Version")]...).Has(obj.GetName()) {
351351
logger.Log(fmt.Errorf("using unknown %s version %s", obj.GetKind(), obj.GetName()))
352352
return nil
@@ -361,7 +361,7 @@ func checkObject(ri p.ResourceInfo) error {
361361
logger.Log(err)
362362
return nil
363363
}
364-
} else if gvr.Group == "stash.appscode.com" {
364+
case "stash.appscode.com":
365365
taskName, _, err := unstructured.NestedString(obj.Object, "spec", "task", "name")
366366
if err != nil {
367367
logger.Log(err)
@@ -371,7 +371,7 @@ func checkObject(ri p.ResourceInfo) error {
371371
logger.Log(err)
372372
return nil
373373
}
374-
} else if gvr.Group == "kubevault.com" {
374+
case "kubevault.com":
375375
appVersion, _, err := unstructured.NestedString(obj.Object, "spec", "version")
376376
if err != nil {
377377
logger.Log(err)
@@ -381,7 +381,7 @@ func checkObject(ri p.ResourceInfo) error {
381381
logger.Log(fmt.Errorf("using unknown %s version %s", obj.GetKind(), appVersion))
382382
return nil
383383
}
384-
} else if gvr.Group == "catalog.kubevault.com" {
384+
case "catalog.kubevault.com":
385385
if !sets.NewString(kubevaultcatalog.ActiveVersions()[strings.TrimSuffix(obj.GetKind(), "Version")]...).Has(obj.GetName()) {
386386
logger.Log(fmt.Errorf("using unknown %s version %s", obj.GetKind(), obj.GetName()))
387387
return nil
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: "2"
2+
linters:
3+
default: standard
4+
enable:
5+
- unparam
6+
7+
formatters:
8+
enable:
9+
- gofmt
10+
- goimports
11+
settings:
12+
gofmt:
13+
rewrite-rules:
14+
- pattern: 'interface{}'
15+
replacement: 'any'
16+
17+
issues:
18+
max-same-issues: 100
19+
20+
exclude-files:
21+
- generated.*\\.go
22+
23+
exclude-dirs:
24+
- vendor
25+
26+
run:
27+
timeout: 10m

vendor/kmodules.xyz/client-go/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,6 @@ test: $(BUILD_DIRS)
242242
./hack/test.sh $(SRC_PKGS) \
243243
"
244244

245-
ADDTL_LINTERS := gofmt,goimports,unparam
246-
247245
.PHONY: lint
248246
lint: $(BUILD_DIRS)
249247
@echo "running linter"
@@ -261,7 +259,7 @@ lint: $(BUILD_DIRS)
261259
--env GO111MODULE=on \
262260
--env GOFLAGS="-mod=vendor" \
263261
$(BUILD_IMAGE) \
264-
golangci-lint run --enable $(ADDTL_LINTERS) --timeout=10m --exclude-files="generated.*\.go$\" --exclude-dirs-use-default
262+
golangci-lint run
265263

266264
$(BUILD_DIRS):
267265
@mkdir -p $@

vendor/kmodules.xyz/client-go/api/v1/object.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ func MustParseObjectID(key OID) *ObjectID {
158158
return oid
159159
}
160160

161-
func ObjectIDMap(key OID) (map[string]interface{}, error) {
162-
id := map[string]interface{}{
161+
func ObjectIDMap(key OID) (map[string]any, error) {
162+
id := map[string]any{
163163
"group": "",
164164
"kind": "",
165165
"namespace": "",

vendor/kmodules.xyz/client-go/api/v1/timeofday.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func (t TimeOfDay) MarshalJSON() ([]byte, error) {
164164
}
165165

166166
// ToUnstructured implements the value.UnstructuredConverter interface.
167-
func (t TimeOfDay) ToUnstructured() interface{} {
167+
func (t TimeOfDay) ToUnstructured() any {
168168
if t.IsZero() {
169169
return nil
170170
}
@@ -177,11 +177,11 @@ func (t TimeOfDay) ToUnstructured() interface{} {
177177
// the OpenAPI spec of this type.
178178
//
179179
// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators
180-
func (_ TimeOfDay) OpenAPISchemaType() []string { return []string{"string"} }
180+
func (TimeOfDay) OpenAPISchemaType() []string { return []string{"string"} }
181181

182182
// OpenAPISchemaFormat is used by the kube-openapi generator when constructing
183183
// the OpenAPI spec of this type.
184-
func (_ TimeOfDay) OpenAPISchemaFormat() string { return "time" }
184+
func (TimeOfDay) OpenAPISchemaFormat() string { return "time" }
185185

186186
// MarshalQueryParameter converts to a URL query parameter value
187187
func (t TimeOfDay) MarshalQueryParameter() (string, error) {
@@ -201,7 +201,7 @@ func (t *TimeOfDay) Fuzz(c fuzz.Continue) {
201201
// Allow for about 1000 years of randomness. Leave off nanoseconds
202202
// because JSON doesn't represent them so they can't round-trip
203203
// properly.
204-
t.Time = time.Unix(c.Rand.Int63n(1000*365*24*60*60), 0)
204+
t.Time = time.Unix(c.Int63n(1000*365*24*60*60), 0)
205205
}
206206

207207
// ensure Time implements fuzz.Interface

vendor/kmodules.xyz/client-go/meta/annotations.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
kutil "kmodules.xyz/client-go"
2424
)
2525

26-
type ParserFunc func(map[string]string, string) (interface{}, error)
26+
type ParserFunc func(map[string]string, string) (any, error)
2727

2828
var (
2929
_ ParserFunc = GetBool
@@ -35,7 +35,7 @@ var (
3535
_ ParserFunc = GetDuration
3636
)
3737

38-
func GetBool(m map[string]string, key string) (interface{}, error) {
38+
func GetBool(m map[string]string, key string) (any, error) {
3939
if m == nil {
4040
return false, kutil.ErrNotFound
4141
}
@@ -51,7 +51,7 @@ func GetBoolValue(m map[string]string, key string) (bool, error) {
5151
return v.(bool), err
5252
}
5353

54-
func GetInt(m map[string]string, key string) (interface{}, error) {
54+
func GetInt(m map[string]string, key string) (any, error) {
5555
if m == nil {
5656
return 0, kutil.ErrNotFound
5757
}
@@ -67,7 +67,7 @@ func GetIntValue(m map[string]string, key string) (int, error) {
6767
return v.(int), err
6868
}
6969

70-
func GetString(m map[string]string, key string) (interface{}, error) {
70+
func GetString(m map[string]string, key string) (any, error) {
7171
if m == nil {
7272
return "", kutil.ErrNotFound
7373
}
@@ -99,7 +99,7 @@ func RemoveKey(m map[string]string, key string) map[string]string {
9999
return m
100100
}
101101

102-
func GetList(m map[string]string, key string) (interface{}, error) {
102+
func GetList(m map[string]string, key string) (any, error) {
103103
if m == nil {
104104
return []string{}, kutil.ErrNotFound
105105
}
@@ -117,7 +117,7 @@ func GetListValue(m map[string]string, key string) ([]string, error) {
117117
return v.([]string), err
118118
}
119119

120-
func GetMap(m map[string]string, key string) (interface{}, error) {
120+
func GetMap(m map[string]string, key string) (any, error) {
121121
if m == nil {
122122
return map[string]string{}, kutil.ErrNotFound
123123
}
@@ -135,7 +135,7 @@ func GetMapValue(m map[string]string, key string) (map[string]string, error) {
135135
return v.(map[string]string), err
136136
}
137137

138-
func GetFloat(m map[string]string, key string) (interface{}, error) {
138+
func GetFloat(m map[string]string, key string) (any, error) {
139139
if m == nil {
140140
return 0.0, kutil.ErrNotFound
141141
}
@@ -152,7 +152,7 @@ func GetFloatValue(m map[string]string, key string) (float64, error) {
152152
return v.(float64), err
153153
}
154154

155-
func GetDuration(m map[string]string, key string) (interface{}, error) {
155+
func GetDuration(m map[string]string, key string) (any, error) {
156156
if m == nil {
157157
return time.Duration(0), kutil.ErrNotFound
158158
}
@@ -169,10 +169,10 @@ func GetDurationValue(m map[string]string, key string) (time.Duration, error) {
169169
return v.(time.Duration), err
170170
}
171171

172-
type GetFunc func(map[string]string) (interface{}, error)
172+
type GetFunc func(map[string]string) (any, error)
173173

174174
func ParseFor(key string, fn ParserFunc) GetFunc {
175-
return func(m map[string]string) (interface{}, error) {
175+
return func(m map[string]string) (any, error) {
176176
return fn(m, key)
177177
}
178178
}

0 commit comments

Comments
 (0)