Skip to content

Commit 97e41bf

Browse files
update depts
Signed-off-by: Anisur Rahman <anisur@appscode.com>
1 parent c2f8b6a commit 97e41bf

5 files changed

Lines changed: 33 additions & 37 deletions

File tree

go.mod

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
k8s.io/kubectl v0.30.2
2525
kmodules.xyz/client-go v0.32.7
2626
kmodules.xyz/csi-utils v0.29.1
27-
kmodules.xyz/objectstore-api v0.32.0
27+
kmodules.xyz/objectstore-api v0.32.1
2828
kmodules.xyz/offshoot-api v0.32.0
2929
kmodules.xyz/openshift v0.29.0
3030
sigs.k8s.io/controller-runtime v0.22.1
@@ -217,6 +217,4 @@ replace github.com/Masterminds/sprig/v3 => github.com/gomodules/sprig/v3 v3.2.3-
217217

218218
replace sigs.k8s.io/controller-runtime => github.com/kmodules/controller-runtime v0.20.3-0.20250221050548-8eabe54e7dda
219219

220-
replace k8s.io/apiserver => github.com/kmodules/apiserver v0.32.3-0.20250221062720-35dc674c7dd6
221-
222-
replace kmodules.xyz/objectstore-api => github.com/anisurrahman75/objectstore-api v0.0.0-20250911092849-918d6307bf4a
220+
replace k8s.io/apiserver => github.com/kmodules/apiserver v0.32.3-0.20250221062720-35dc674c7dd6

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lpr
7575
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
7676
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
7777
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
78-
github.com/anisurrahman75/objectstore-api v0.0.0-20250911092849-918d6307bf4a h1:0+rlQZtFTNRoX0X+TL9xCVMs2sc/BfDGy3StoqCefxg=
79-
github.com/anisurrahman75/objectstore-api v0.0.0-20250911092849-918d6307bf4a/go.mod h1:Po7zgWJnm+t8vyUnUKfhvUkUX+hoCJAe06e2ZYCjSuA=
8078
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
8179
github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 h1:7Ip0wMmLHLRJdrloDxZfhMm0xrLXZS8+COSu2bXmEQs=
8280
github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
@@ -816,6 +814,8 @@ kmodules.xyz/csi-utils v0.29.1 h1:O0WDb/rsqj+FwT3C/KshB9hhBTh84YCP3fVb1UGMuHw=
816814
kmodules.xyz/csi-utils v0.29.1/go.mod h1:tcUPTlt0NSlo0RdsHGvA5+LvXhC1WDloqVUkZrzN9MM=
817815
kmodules.xyz/custom-resources v0.32.0 h1:wzmJTtswO+OmvtqYc70pVoopZyt5UJHKTom4Jh6bfhM=
818816
kmodules.xyz/custom-resources v0.32.0/go.mod h1:aLFrfbUKS+AkKtxFYWpPGzuLNarRtGlkHwC07APHba8=
817+
kmodules.xyz/objectstore-api v0.32.1 h1:5Os8XBI3tzie0kj+lijWMDo9fU0Z4SiNrg/yDS3X6PQ=
818+
kmodules.xyz/objectstore-api v0.32.1/go.mod h1:LemalivFgrGxl13NsfileTiBje8HjaA1K/rMxmxdozk=
819819
kmodules.xyz/offshoot-api v0.32.0 h1:gogc5scSZe2JoXtZof72UGRl3Tit0kFaFRMkLLT1D8o=
820820
kmodules.xyz/offshoot-api v0.32.0/go.mod h1:tled7OxYZ3SkUJcrVFVVYyd+zXjsRSEm1R6Q3k4gcx0=
821821
kmodules.xyz/openshift v0.29.0 h1:8PXjeQ+usUGkLnYUMSbZrMg+i1OIYBe9UWOeBf2FRzU=

vendor/kmodules.xyz/objectstore-api/api/v1/openapi_generated.go

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

vendor/kmodules.xyz/objectstore-api/pkg/blob/blob.go

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
22
Copyright AppsCode Inc. and Contributors
33
4-
Licensed under the AppsCode Free Trial License 1.0.0 (the "License");
4+
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
66
You may obtain a copy of the License at
77
8-
https://github.com/appscode/licenses/raw/1.0.0/AppsCode-Free-Trial-1.0.0.md
8+
http://www.apache.org/licenses/LICENSE-2.0
99
1010
Unless required by applicable law or agreed to in writing, software
1111
distributed under the License is distributed on an "AS IS" BASIS,
@@ -27,21 +27,20 @@ import (
2727
"path"
2828
"strings"
2929

30+
api "kmodules.xyz/objectstore-api/api/v1"
31+
3032
aws2 "github.com/aws/aws-sdk-go-v2/aws"
3133
"github.com/aws/aws-sdk-go-v2/config"
3234
"github.com/aws/aws-sdk-go-v2/credentials"
3335
"github.com/aws/aws-sdk-go-v2/service/s3"
34-
"k8s.io/apimachinery/pkg/types"
35-
v2 "kmodules.xyz/objectstore-api/api/v1"
36-
3736
"gocloud.dev/blob"
3837
_ "gocloud.dev/blob/azureblob"
3938
_ "gocloud.dev/blob/fileblob"
4039
_ "gocloud.dev/blob/gcsblob"
4140
"gocloud.dev/blob/s3blob"
42-
_ "gocloud.dev/blob/s3blob"
43-
v1 "k8s.io/api/core/v1"
41+
core "k8s.io/api/core/v1"
4442
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
43+
"k8s.io/apimachinery/pkg/types"
4544
"k8s.io/apimachinery/pkg/util/errors"
4645
"k8s.io/klog/v2"
4746
"sigs.k8s.io/controller-runtime/pkg/client"
@@ -67,16 +66,16 @@ const (
6766
type Blob struct {
6867
prefix string
6968
storageURL string
70-
secret *v1.Secret
71-
bConfig *v2.Backend
69+
secret *core.Secret
70+
bConfig *api.Backend
7271
}
7372

74-
func NewBlob(ctx context.Context, c client.Client, namespace string, bConfig *v2.Backend) (*Blob, error) {
73+
func NewBlob(ctx context.Context, c client.Client, namespace string, bConfig *api.Backend) (*Blob, error) {
7574
provider, err := bConfig.Provider()
7675
if err != nil {
7776
return nil, err
7877
}
79-
var secret *v1.Secret
78+
var secret *core.Secret
8079
if bConfig.StorageSecretName != "" {
8180
secret, err = getStorageSecret(ctx, c, types.NamespacedName{
8281
Namespace: namespace,
@@ -88,28 +87,28 @@ func NewBlob(ctx context.Context, c client.Client, namespace string, bConfig *v2
8887
}
8988

9089
switch provider {
91-
case v2.ProviderS3:
90+
case api.ProviderS3:
9291
return s3Blob(secret, bConfig), nil
93-
case v2.ProviderGCS:
92+
case api.ProviderGCS:
9493
return gcsBlob(secret, bConfig)
95-
case v2.ProviderAzure:
94+
case api.ProviderAzure:
9695
return azureBlob(secret, bConfig)
97-
case v2.ProviderLocal:
96+
case api.ProviderLocal:
9897
return localBlob(bConfig)
9998
default:
10099
return nil, fmt.Errorf("unknown provider: %s", provider)
101100
}
102101
}
103102

104-
func s3Blob(secret *v1.Secret, bConfig *v2.Backend) *Blob {
103+
func s3Blob(secret *core.Secret, bConfig *api.Backend) *Blob {
105104
return &Blob{
106105
secret: secret,
107106
bConfig: bConfig,
108107
prefix: bConfig.S3.Prefix,
109108
}
110109
}
111110

112-
func gcsBlob(secret *v1.Secret, bConfig *v2.Backend) (*Blob, error) {
111+
func gcsBlob(secret *core.Secret, bConfig *api.Backend) (*Blob, error) {
113112
if secret != nil {
114113
if err := setGcsCredentialsToEnv(secret); err != nil {
115114
return nil, err
@@ -122,7 +121,7 @@ func gcsBlob(secret *v1.Secret, bConfig *v2.Backend) (*Blob, error) {
122121
}, nil
123122
}
124123

125-
func azureBlob(secret *v1.Secret, bConfig *v2.Backend) (*Blob, error) {
124+
func azureBlob(secret *core.Secret, bConfig *api.Backend) (*Blob, error) {
126125
if secret != nil {
127126
if err := setAzureCredentialsToEnv(secret); err != nil {
128127
return nil, err
@@ -134,14 +133,14 @@ func azureBlob(secret *v1.Secret, bConfig *v2.Backend) (*Blob, error) {
134133
}, nil
135134
}
136135

137-
func localBlob(bConfig *v2.Backend) (*Blob, error) {
136+
func localBlob(bConfig *api.Backend) (*Blob, error) {
138137
return &Blob{
139138
storageURL: fmt.Sprintf("%s%s?no_tmp_dir=true", localPrefix, bConfig.Local.MountPath),
140139
}, nil
141140
}
142141

143-
func getStorageSecret(ctx context.Context, c client.Client, nsName types.NamespacedName) (*v1.Secret, error) {
144-
secret := &v1.Secret{
142+
func getStorageSecret(ctx context.Context, c client.Client, nsName types.NamespacedName) (*core.Secret, error) {
143+
secret := &core.Secret{
145144
ObjectMeta: metav1.ObjectMeta{
146145
Namespace: nsName.Namespace,
147146
Name: nsName.Name,
@@ -153,7 +152,7 @@ func getStorageSecret(ctx context.Context, c client.Client, nsName types.Namespa
153152
return secret, nil
154153
}
155154

156-
func setGcsCredentialsToEnv(secret *v1.Secret) error {
155+
func setGcsCredentialsToEnv(secret *core.Secret) error {
157156
if val, ok := secret.Data[googleServiceAccountJsonKey]; !ok {
158157
return fmt.Errorf("storage secret missing %s key", googleServiceAccountJsonKey)
159158
} else {
@@ -168,7 +167,7 @@ func setGcsCredentialsToEnv(secret *v1.Secret) error {
168167
return nil
169168
}
170169

171-
func setAzureCredentialsToEnv(secret *v1.Secret) error {
170+
func setAzureCredentialsToEnv(secret *core.Secret) error {
172171
if val, ok := secret.Data[azureAccountKey]; !ok {
173172
return fmt.Errorf("storage secret missing %s key", azureAccountKey)
174173
} else {
@@ -427,7 +426,7 @@ func (b *Blob) openBucketWithDebug(ctx context.Context, dir string, debug bool)
427426
return nil, err
428427
}
429428

430-
if provider == v2.ProviderS3 {
429+
if provider == api.ProviderS3 {
431430
cfg, err := b.getS3Config(ctx, debug)
432431
if err != nil {
433432
return nil, err

vendor/modules.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,8 +1762,8 @@ kmodules.xyz/custom-resources/client/clientset/versioned/scheme
17621762
kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1
17631763
kmodules.xyz/custom-resources/client/clientset/versioned/typed/metrics/v1alpha1
17641764
kmodules.xyz/custom-resources/crds
1765-
# kmodules.xyz/objectstore-api v0.32.0 => github.com/anisurrahman75/objectstore-api v0.0.0-20250911092849-918d6307bf4a
1766-
## explicit; go 1.24.0
1765+
# kmodules.xyz/objectstore-api v0.32.1
1766+
## explicit; go 1.24
17671767
kmodules.xyz/objectstore-api/api/v1
17681768
kmodules.xyz/objectstore-api/pkg/blob
17691769
# kmodules.xyz/offshoot-api v0.32.0
@@ -1973,4 +1973,3 @@ stash.appscode.dev/stash/pkg/util
19731973
# github.com/Masterminds/sprig/v3 => github.com/gomodules/sprig/v3 v3.2.3-0.20220405051441-0a8a99bac1b8
19741974
# sigs.k8s.io/controller-runtime => github.com/kmodules/controller-runtime v0.20.3-0.20250221050548-8eabe54e7dda
19751975
# k8s.io/apiserver => github.com/kmodules/apiserver v0.32.3-0.20250221062720-35dc674c7dd6
1976-
# kmodules.xyz/objectstore-api => github.com/anisurrahman75/objectstore-api v0.0.0-20250911092849-918d6307bf4a

0 commit comments

Comments
 (0)