Skip to content

Commit 58d6c7c

Browse files
authored
Update deps (#62)
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent 88af4d9 commit 58d6c7c

File tree

21 files changed

+519
-266
lines changed

21 files changed

+519
-266
lines changed

api/v1/types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ const (
3535
// +k8s:deepcopy-gen=false
3636
type Event struct {
3737
LicenseID string `json:"licenseID,omitempty"`
38-
ResourceID kmapi.ResourceID `json:"resourceID,omitempty"`
38+
ResourceID kmapi.ResourceID `json:"resourceID"`
3939
Resource client.Object `json:"resource,omitempty"`
4040
}
4141

4242
type UnstructuredEvent struct {
4343
LicenseID string `json:"licenseID,omitempty"`
44-
ResourceID kmapi.ResourceID `json:"resourceID,omitempty"`
44+
ResourceID kmapi.ResourceID `json:"resourceID"`
4545
Resource *unstructured.Unstructured `json:"resource,omitempty"`
4646
}

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ require (
1313
k8s.io/apimachinery v0.34.3
1414
k8s.io/client-go v0.34.3
1515
k8s.io/klog/v2 v2.130.1
16-
kmodules.xyz/client-go v0.34.2
17-
kmodules.xyz/resource-metadata v0.42.1
16+
kmodules.xyz/client-go v0.34.3
17+
kmodules.xyz/resource-metadata v0.42.4
1818
sigs.k8s.io/controller-runtime v0.22.4
1919
)
2020

@@ -108,7 +108,7 @@ require (
108108
golang.org/x/net v0.47.0 // indirect
109109
golang.org/x/oauth2 v0.33.0 // indirect
110110
golang.org/x/sync v0.19.0 // indirect
111-
golang.org/x/sys v0.39.0 // indirect
111+
golang.org/x/sys v0.40.0 // indirect
112112
golang.org/x/term v0.38.0 // indirect
113113
golang.org/x/text v0.32.0 // indirect
114114
golang.org/x/time v0.14.0 // indirect

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,8 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
267267
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
268268
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
269269
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
270-
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
271-
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
270+
golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ=
271+
golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
272272
golang.org/x/term v0.38.0 h1:PQ5pkm/rLO6HnxFR7N2lJHOZX6Kez5Y1gDSJla6jo7Q=
273273
golang.org/x/term v0.38.0/go.mod h1:bSEAKrOT1W+VSu9TSCMtoGEOUcKxOKgl3LE5QEF/xVg=
274274
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -343,14 +343,14 @@ k8s.io/utils v0.0.0-20251002143259-bc988d571ff4 h1:SjGebBtkBqHFOli+05xYbK8YF1Dzk
343343
k8s.io/utils v0.0.0-20251002143259-bc988d571ff4/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
344344
kmodules.xyz/apiversion v0.2.0 h1:vAQYqZFm4xu4pbB1cAdHbFEPES6EQkcR4wc06xdTOWk=
345345
kmodules.xyz/apiversion v0.2.0/go.mod h1:oPX8g8LvlPdPX3Yc5YvCzJHQnw3YF/X4/jdW0b1am80=
346-
kmodules.xyz/client-go v0.34.2 h1:2Cec+nyfj9kfbR+5KPK3AksxN6h4jSjhn/tw+Dhqggo=
347-
kmodules.xyz/client-go v0.34.2/go.mod h1:kQRuGMxhb+B9rVdcfBzjK+PV7oBDo+SaDiQ66u1QG+4=
346+
kmodules.xyz/client-go v0.34.3 h1:2K2Tjwwy62QOpgIpuRB0STDAt2e7omkKt06oC8YV+/U=
347+
kmodules.xyz/client-go v0.34.3/go.mod h1:myCt7AfRao4PBdUtKXu01xxbqqmLZ5U8fW0LQDaifhQ=
348348
kmodules.xyz/go-containerregistry v0.0.15 h1:PRY5FDOzb6u23KOulQ4SWNdeUkBKmezLyJXP88q4EPw=
349349
kmodules.xyz/go-containerregistry v0.0.15/go.mod h1:rO0DEbYYEu1BfVcZ1pXV+3RgzVXr/k5hXcO+BQYVVDI=
350350
kmodules.xyz/offshoot-api v0.34.0 h1:HnOOp8FrCjTWjtNApRDo6Ahe79tOlLrJmyye4xxO4Kk=
351351
kmodules.xyz/offshoot-api v0.34.0/go.mod h1:F+B59yYw4CZJ4uD4xu6C+mMLzIXUtuH7E+SbDICl9jE=
352-
kmodules.xyz/resource-metadata v0.42.1 h1:RxAi354cKOeCVLoZI+WjR+tooU4lEq/axIafm1SYa20=
353-
kmodules.xyz/resource-metadata v0.42.1/go.mod h1:xntcQko2QLbLEHwGE4TQ7I/80fcBQzcexbep97Akstk=
352+
kmodules.xyz/resource-metadata v0.42.4 h1:nFVo+PKmwWdzVwk7U3VZuKBQj3tPo6fyY5BC7gE2OB8=
353+
kmodules.xyz/resource-metadata v0.42.4/go.mod h1:++18wSB28Wrw3ZxnOd8o8IVg7oMyWPwaPfuLw21QnPc=
354354
kmodules.xyz/resource-metrics v0.34.0 h1:cqscgTx3PONxHj6PIySK3sTlKKv8iKTGzRd+S6YSwXg=
355355
kmodules.xyz/resource-metrics v0.34.0/go.mod h1:R34IKtp5+NqcQz7AQJheBJK6Iem0LqrCbm/55Mn+ECQ=
356356
moul.io/http2curl/v2 v2.3.1-0.20221024080105-10c404f653f7 h1:NykkTlRB+X40z86cLHdEmuoTxhNKhQebLT379b1EumA=

lib/nats.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ type NatsConfig struct {
5252

5353
// NatsCredential represents the api response of the register licensed user api
5454
type NatsCredential struct {
55-
NatsConfig `json:",inline,omitempty"`
55+
NatsConfig `json:",inline"`
5656
Credential []byte `json:"credential"`
5757
}
5858

vendor/golang.org/x/sys/cpu/cpu_x86.go

Lines changed: 124 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ func RemoveCertificate(certificates []CertificateSpec, alias string) []Certifica
261261
type stringSetMerger struct{}
262262

263263
func (t stringSetMerger) Transformer(typ reflect.Type) func(dst, src reflect.Value) error {
264-
if typ == reflect.TypeOf([]string{}) {
264+
if typ == reflect.TypeFor[[]string]() {
265265
return func(dst, src reflect.Value) error {
266266
if dst.CanSet() {
267267
if dst.Len() <= 1 && src.Len() == 0 {

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

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"crypto/hmac"
2222
"crypto/sha256"
2323
"encoding/base64"
24+
"encoding/json"
2425
"fmt"
2526
)
2627

@@ -143,7 +144,43 @@ type ClusterClaimInfo struct {
143144
}
144145

145146
type ClusterClaimFeatures struct {
146-
EnabledFeatures []string `json:"enabledFeatures,omitempty" protobuf:"bytes,1,rep,name=enabledFeatures"`
147-
ExternallyManagedFeatures []string `json:"externallyManagedFeatures,omitempty" protobuf:"bytes,2,rep,name=externallyManagedFeatures"`
148-
DisabledFeatures []string `json:"disabledFeatures,omitempty" protobuf:"bytes,3,rep,name=disabledFeatures"`
147+
EnabledFeatures map[string]string `json:"enabledFeatures,omitempty" protobuf:"bytes,1,opt,name=enabledFeatures"`
148+
ExternallyManagedFeatures []string `json:"externallyManagedFeatures,omitempty" protobuf:"bytes,2,opt,name=externallyManagedFeatures"`
149+
DisabledFeatures []string `json:"disabledFeatures,omitempty" protobuf:"bytes,3,opt,name=disabledFeatures"`
150+
}
151+
152+
func (f *ClusterClaimFeatures) UnmarshalJSON(data []byte) error {
153+
aux := &struct {
154+
EnabledFeatures any `json:"enabledFeatures,omitempty"`
155+
ExternallyManagedFeatures []string `json:"externallyManagedFeatures,omitempty"`
156+
DisabledFeatures []string `json:"disabledFeatures,omitempty"`
157+
}{}
158+
159+
if err := json.Unmarshal(data, aux); err != nil {
160+
return err
161+
}
162+
163+
f.EnabledFeatures = toStringMap(aux.EnabledFeatures)
164+
f.ExternallyManagedFeatures = aux.ExternallyManagedFeatures
165+
f.DisabledFeatures = aux.DisabledFeatures
166+
return nil
167+
}
168+
169+
func toStringMap(v any) map[string]string {
170+
result := make(map[string]string)
171+
switch val := v.(type) {
172+
case []any:
173+
for _, item := range val {
174+
if str, ok := item.(string); ok {
175+
result[str] = ""
176+
}
177+
}
178+
case map[string]any:
179+
for k, item := range val {
180+
if str, ok := item.(string); ok {
181+
result[k] = str
182+
}
183+
}
184+
}
185+
return result
149186
}

0 commit comments

Comments
 (0)