Skip to content

Commit 8779391

Browse files
author
Chanwit Kaewkasi
committed
upgrade flux v2 dependencies
Signed-off-by: Chanwit Kaewkasi <[email protected]>
1 parent d65045d commit 8779391

Some content is hidden

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

52 files changed

+5137
-3755
lines changed

Makefile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ BUILD_TIME?=$(shell date +'%Y-%m-%d_%T')
77
BRANCH?=$(shell which git > /dev/null && git rev-parse --abbrev-ref HEAD)
88
GIT_COMMIT?=$(shell which git > /dev/null && git log -n1 --pretty='%h')
99
VERSION?=$(shell which git > /dev/null && git describe --always --match "v*")
10-
FLUX_VERSION=0.37.0
10+
FLUX_VERSION=2.0.1
1111
CHART_VERSION=$(shell which yq > /dev/null && yq e '.version' charts/gitops-server/Chart.yaml)
1212
DEV_BUCKET_CONTAINER_IMAGE?=ghcr.io/weaveworks/gitops-bucket-server@sha256:9fa2a68032b9d67197a3d41a46b5029ffdf9a7bc415e4e7e9794faec8bc3b8e4
1313
TIER=oss
@@ -221,6 +221,16 @@ echo-flux-version:
221221
echo-dev-bucket-container:
222222
@echo $(DEV_BUCKET_CONTAINER_IMAGE)
223223

224+
download-test-crds:
225+
group_resources="source/helmrepositories source/buckets source/gitrepositories source/helmcharts source/ocirepositories"; \
226+
for group_resource in $$group_resources; do \
227+
group="$${group_resource%/*}"; resource="$${group_resource#*/}"; \
228+
echo "Downloading $${group}.$${resource}"; \
229+
curl -sL "https://github.com/raw/fluxcd/source-controller/v1.0.0/config/crd/bases/$${group}.toolkit.fluxcd.io_$${resource}.yaml" -o "tools/testcrds/$${group}.toolkit.fluxcd.io_$${resource}.yaml"; \
230+
done
231+
curl -sL "https://github.com/raw/fluxcd/kustomize-controller/v1.0.0/config/crd/bases/kustomize.toolkit.fluxcd.io_kustomizations.yaml" -o "tools/testcrds/kustomize.toolkit.fluxcd.io_kustomizations.yaml"
232+
curl -sL "https://github.com/raw/fluxcd/helm-controller/v0.35.0/config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml" -o "tools/testcrds/helm.toolkit.fluxcd.io_helmreleases.yaml"
233+
224234
.PHONY: help
225235
# Thanks to https://www.thapaliya.com/en/writings/well-documented-makefiles/
226236
help: ## Display this help.

Tiltfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ k8s_yaml(helm('./tools/charts/dev', name='dev', values='./tools/charts/dev/value
6161

6262
deps = ['gitops-server'] if advanced_go_dev_mode else []
6363

64-
if not skip_ui_build:
65-
deps.append('ui-server')
64+
if advanced_go_dev_mode:
65+
if not skip_ui_build:
66+
deps.append('ui-server')
6667

6768

6869
k8s_resource('dev-weave-gitops', port_forwards='9001', resource_deps=deps)

cmd/gitops/beta/run/cmd.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import (
1717
"time"
1818

1919
"github.com/fluxcd/go-git-providers/gitprovider"
20-
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta2"
21-
sourcev1 "github.com/fluxcd/source-controller/api/v1beta2"
20+
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1"
21+
sourcev1 "github.com/fluxcd/source-controller/api/v1"
2222
"github.com/fsnotify/fsnotify"
2323
"github.com/manifoldco/promptui"
2424
"github.com/spf13/cobra"
@@ -1045,6 +1045,7 @@ func runCommandInnerProcess(cmd *cobra.Command, args []string) error {
10451045
podErr error
10461046
)
10471047

1048+
//nolint:staticcheck // deprecated, tracking issue: https://github.com/weaveworks/weave-gitops/issues/3812
10481049
if pollErr := wait.PollImmediate(2*time.Second, flags.Timeout, func() (bool, error) {
10491050
pod, podErr = run.GetPodFromResourceDescription(thisCtx, kubeClient, namespacedName, specMap.Kind, nil)
10501051
if pod != nil && podErr == nil {

core/clustersmngr/client_test.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,19 @@ import (
1111
. "github.com/onsi/gomega"
1212
"sigs.k8s.io/controller-runtime/pkg/client"
1313

14-
sourcev1 "github.com/fluxcd/source-controller/api/v1beta2"
14+
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1"
15+
"github.com/fluxcd/pkg/apis/meta"
16+
sourcev1 "github.com/fluxcd/source-controller/api/v1"
17+
"github.com/weaveworks/weave-gitops/core/clustersmngr"
18+
"github.com/weaveworks/weave-gitops/core/clustersmngr/cluster"
19+
"github.com/weaveworks/weave-gitops/pkg/kube"
1520
corev1 "k8s.io/api/core/v1"
21+
rbacv1 "k8s.io/api/rbac/v1"
1622
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1723
"k8s.io/apimachinery/pkg/labels"
1824
"k8s.io/apimachinery/pkg/types"
1925
"k8s.io/apimachinery/pkg/util/rand"
2026
"k8s.io/client-go/rest"
21-
22-
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta2"
23-
"github.com/fluxcd/pkg/apis/meta"
24-
"github.com/weaveworks/weave-gitops/core/clustersmngr"
25-
"github.com/weaveworks/weave-gitops/core/clustersmngr/cluster"
26-
"github.com/weaveworks/weave-gitops/pkg/kube"
27-
rbacv1 "k8s.io/api/rbac/v1"
2827
)
2928

3029
func TestClientGet(t *testing.T) {

core/clustersmngr/cluster/delegating_cache.go

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,12 @@ func (c *delegatingCacheCluster) GetHost() string {
4141
}
4242

4343
func (c *delegatingCacheCluster) makeCachingClient(leafClient client.Client) (client.Client, error) {
44-
mapper, err := apiutil.NewDiscoveryRESTMapper(c.restConfig)
44+
httpCli, err := rest.HTTPClientFor(c.restConfig)
45+
if err != nil {
46+
return nil, fmt.Errorf("failed to create http client: %w", err)
47+
}
48+
49+
mapper, err := apiutil.NewDiscoveryRESTMapper(c.restConfig, httpCli)
4550
if err != nil {
4651
return nil, fmt.Errorf("could not create RESTMapper from config: %w", err)
4752
}
@@ -54,17 +59,18 @@ func (c *delegatingCacheCluster) makeCachingClient(leafClient client.Client) (cl
5459
return nil, fmt.Errorf("failed creating client cache: %w", err)
5560
}
5661

62+
// Remove DelegatedClient, move Options in client.New
63+
// https://github.com/kubernetes-sigs/controller-runtime/pull/2150
5764
delegatingCache := newDelegatingCache(leafClient, cache, c.scheme)
5865

59-
delegatingClient, err := client.NewDelegatingClient(client.NewDelegatingClientInput{
60-
CacheReader: delegatingCache,
61-
Client: leafClient,
62-
// Non-exact field matches are not supported by the cache.
63-
// https://github.com/kubernetes-sigs/controller-runtime/issues/612
64-
// TODO: Research if we can change the way we query those events so we can enable the cache for it.
65-
UncachedObjects: []client.Object{&v1.Event{}},
66-
CacheUnstructured: true,
66+
delegatingClient, err := client.New(c.restConfig, client.Options{
67+
Cache: &client.CacheOptions{
68+
Reader: delegatingCache,
69+
DisableFor: []client.Object{&v1.Event{}},
70+
Unstructured: true,
71+
},
6772
})
73+
6874
if err != nil {
6975
return nil, fmt.Errorf("failed creating DelegatingClient: %w", err)
7076
}

core/clustersmngr/cluster/single.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ func (c *singleCluster) GetHost() string {
5555
}
5656

5757
func getClientFromConfig(config *rest.Config, scheme *apiruntime.Scheme) (client.Client, error) {
58-
mapper, err := apiutil.NewDiscoveryRESTMapper(config)
58+
httpCli, err := rest.HTTPClientFor(config)
59+
if err != nil {
60+
return nil, fmt.Errorf("failed to create http client: %w", err)
61+
}
62+
mapper, err := apiutil.NewDiscoveryRESTMapper(config, httpCli)
5963
if err != nil {
6064
return nil, fmt.Errorf("could not create RESTMapper from config: %w", err)
6165
}

core/clustersmngr/factory.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ func (cf *clustersManager) watchClusters(ctx context.Context) {
275275

276276
cf.initialClustersLoad <- true
277277

278+
//nolint:staticcheck // deprecated, tracking issue: https://github.com/weaveworks/weave-gitops/issues/3812
278279
if err := wait.PollImmediateInfinite(watchClustersFrequency, func() (bool, error) {
279280
if err := cf.UpdateClusters(ctx); err != nil {
280281
cf.log.Error(err, "Failed to update clusters")
@@ -312,6 +313,7 @@ func (cf *clustersManager) watchNamespaces(ctx context.Context) {
312313
// waits the first load of cluster to start watching namespaces
313314
<-cf.initialClustersLoad
314315

316+
//nolint:staticcheck // deprecated, tracking issue: https://github.com/weaveworks/weave-gitops/issues/3812
315317
if err := wait.PollImmediateInfinite(watchNamespaceFrequency, func() (bool, error) {
316318
if err := cf.UpdateNamespaces(ctx); err != nil {
317319
if merr, ok := err.(*multierror.Error); ok {

core/fluxsync/adapters.go

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import (
66
helmv2 "github.com/fluxcd/helm-controller/api/v2beta1"
77
imgautomationv1 "github.com/fluxcd/image-automation-controller/api/v1beta1"
88
reflectorv1 "github.com/fluxcd/image-reflector-controller/api/v1beta2"
9-
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta2"
9+
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1"
1010
"github.com/fluxcd/pkg/apis/meta"
11-
sourcev1 "github.com/fluxcd/source-controller/api/v1beta2"
11+
sourcev1 "github.com/fluxcd/source-controller/api/v1"
12+
sourcev1b2 "github.com/fluxcd/source-controller/api/v1beta2"
1213
"k8s.io/apimachinery/pkg/runtime/schema"
1314
"sigs.k8s.io/controller-runtime/pkg/client"
1415
)
@@ -49,13 +50,13 @@ func NewReconcileable(obj client.Object) Reconcilable {
4950
return HelmReleaseAdapter{HelmRelease: o}
5051
case *sourcev1.GitRepository:
5152
return GitRepositoryAdapter{GitRepository: o}
52-
case *sourcev1.HelmRepository:
53+
case *sourcev1b2.HelmRepository:
5354
return HelmRepositoryAdapter{HelmRepository: o}
54-
case *sourcev1.Bucket:
55+
case *sourcev1b2.Bucket:
5556
return BucketAdapter{Bucket: o}
56-
case *sourcev1.HelmChart:
57+
case *sourcev1b2.HelmChart:
5758
return HelmChartAdapter{HelmChart: o}
58-
case *sourcev1.OCIRepository:
59+
case *sourcev1b2.OCIRepository:
5960
return OCIRepositoryAdapter{OCIRepository: o}
6061
case *reflectorv1.ImageRepository:
6162
return ImageRepositoryAdapter{ImageRepository: o}
@@ -90,7 +91,7 @@ func (obj GitRepositoryAdapter) DeepCopyClientObject() client.Object {
9091
}
9192

9293
type BucketAdapter struct {
93-
*sourcev1.Bucket
94+
*sourcev1b2.Bucket
9495
}
9596

9697
func (obj BucketAdapter) GetLastHandledReconcileRequest() string {
@@ -102,7 +103,7 @@ func (obj BucketAdapter) AsClientObject() client.Object {
102103
}
103104

104105
func (obj BucketAdapter) GroupVersionKind() schema.GroupVersionKind {
105-
return sourcev1.GroupVersion.WithKind(sourcev1.BucketKind)
106+
return sourcev1b2.GroupVersion.WithKind(sourcev1b2.BucketKind)
106107
}
107108

108109
func (obj BucketAdapter) SetSuspended(suspend bool) {
@@ -114,7 +115,7 @@ func (obj BucketAdapter) DeepCopyClientObject() client.Object {
114115
}
115116

116117
type HelmChartAdapter struct {
117-
*sourcev1.HelmChart
118+
*sourcev1b2.HelmChart
118119
}
119120

120121
func (obj HelmChartAdapter) GetLastHandledReconcileRequest() string {
@@ -126,7 +127,7 @@ func (obj HelmChartAdapter) AsClientObject() client.Object {
126127
}
127128

128129
func (obj HelmChartAdapter) GroupVersionKind() schema.GroupVersionKind {
129-
return sourcev1.GroupVersion.WithKind(sourcev1.HelmChartKind)
130+
return sourcev1b2.GroupVersion.WithKind(sourcev1b2.HelmChartKind)
130131
}
131132

132133
func (obj HelmChartAdapter) SetSuspended(suspend bool) {
@@ -138,7 +139,7 @@ func (obj HelmChartAdapter) DeepCopyClientObject() client.Object {
138139
}
139140

140141
type HelmRepositoryAdapter struct {
141-
*sourcev1.HelmRepository
142+
*sourcev1b2.HelmRepository
142143
}
143144

144145
func (obj HelmRepositoryAdapter) GetLastHandledReconcileRequest() string {
@@ -150,7 +151,7 @@ func (obj HelmRepositoryAdapter) AsClientObject() client.Object {
150151
}
151152

152153
func (obj HelmRepositoryAdapter) GroupVersionKind() schema.GroupVersionKind {
153-
return sourcev1.GroupVersion.WithKind(sourcev1.HelmRepositoryKind)
154+
return sourcev1b2.GroupVersion.WithKind(sourcev1b2.HelmRepositoryKind)
154155
}
155156

156157
func (obj HelmRepositoryAdapter) SetSuspended(suspend bool) {
@@ -162,7 +163,7 @@ func (obj HelmRepositoryAdapter) DeepCopyClientObject() client.Object {
162163
}
163164

164165
type OCIRepositoryAdapter struct {
165-
*sourcev1.OCIRepository
166+
*sourcev1b2.OCIRepository
166167
}
167168

168169
func (obj OCIRepositoryAdapter) GetLastHandledReconcileRequest() string {
@@ -174,7 +175,7 @@ func (obj OCIRepositoryAdapter) AsClientObject() client.Object {
174175
}
175176

176177
func (obj OCIRepositoryAdapter) GroupVersionKind() schema.GroupVersionKind {
177-
return sourcev1.GroupVersion.WithKind(sourcev1.OCIRepositoryKind)
178+
return sourcev1b2.GroupVersion.WithKind(sourcev1b2.OCIRepositoryKind)
178179
}
179180

180181
func (obj OCIRepositoryAdapter) SetSuspended(suspend bool) {
@@ -335,17 +336,17 @@ func ToReconcileable(kind string) (client.ObjectList, Reconcilable, error) {
335336
case sourcev1.GitRepositoryKind:
336337
return &sourcev1.GitRepositoryList{}, NewReconcileable(&sourcev1.GitRepository{}), nil
337338

338-
case sourcev1.BucketKind:
339-
return &sourcev1.GitRepositoryList{}, NewReconcileable(&sourcev1.Bucket{}), nil
339+
case sourcev1b2.BucketKind:
340+
return &sourcev1b2.BucketList{}, NewReconcileable(&sourcev1b2.Bucket{}), nil
340341

341-
case sourcev1.HelmRepositoryKind:
342-
return &sourcev1.GitRepositoryList{}, NewReconcileable(&sourcev1.HelmRepository{}), nil
342+
case sourcev1b2.HelmRepositoryKind:
343+
return &sourcev1b2.HelmRepositoryList{}, NewReconcileable(&sourcev1b2.HelmRepository{}), nil
343344

344-
case sourcev1.HelmChartKind:
345-
return &sourcev1.GitRepositoryList{}, NewReconcileable(&sourcev1.HelmChart{}), nil
345+
case sourcev1b2.HelmChartKind:
346+
return &sourcev1b2.HelmChartList{}, NewReconcileable(&sourcev1b2.HelmChart{}), nil
346347

347-
case sourcev1.OCIRepositoryKind:
348-
return &sourcev1.OCIRepositoryList{}, NewReconcileable(&sourcev1.OCIRepository{}), nil
348+
case sourcev1b2.OCIRepositoryKind:
349+
return &sourcev1b2.OCIRepositoryList{}, NewReconcileable(&sourcev1b2.OCIRepository{}), nil
349350

350351
case reflectorv1.ImageRepositoryKind:
351352
return &reflectorv1.ImageRepositoryList{}, NewReconcileable(&reflectorv1.ImageRepository{}), nil

core/fluxsync/fluxsync.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,13 @@ func RequestReconciliation(ctx context.Context, k client.Client, name client.Obj
4444

4545
// WaitForSync polls the k8s API until the resources is sync'd, and times out eventually.
4646
func WaitForSync(ctx context.Context, c client.Client, key client.ObjectKey, obj Reconcilable) error {
47+
//nolint:staticcheck // deprecated, tracking issue: https://github.com/weaveworks/weave-gitops/issues/3812
4748
if err := wait.PollImmediate(
4849
k8sPollInterval,
4950
k8sTimeout,
5051
checkResourceSync(ctx, c, key, obj, obj.GetLastHandledReconcileRequest()),
5152
); err != nil {
53+
//nolint:staticcheck // deprecated, tracking issue: https://github.com/weaveworks/weave-gitops/issues/3812
5254
if errors.Is(err, wait.ErrWaitTimeout) {
5355
return errors.New("sync request timed out. The sync operation may still be in progress")
5456
}

core/server/events_test.go

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

99
helmv2 "github.com/fluxcd/helm-controller/api/v2beta1"
10-
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta2"
10+
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1"
1111
. "github.com/onsi/gomega"
1212
pb "github.com/weaveworks/weave-gitops/pkg/api/core"
1313
"github.com/weaveworks/weave-gitops/pkg/kube"

core/server/fluxruntime.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"sigs.k8s.io/controller-runtime/pkg/client"
2121

2222
helmv2 "github.com/fluxcd/helm-controller/api/v2beta1"
23-
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta2"
23+
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1"
2424
appsv1 "k8s.io/api/apps/v1"
2525
v1 "k8s.io/api/core/v1"
2626
apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"

core/server/fluxruntime_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"fmt"
77
"testing"
88

9-
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta2"
9+
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1"
1010
. "github.com/onsi/gomega"
1111
"github.com/weaveworks/weave-gitops/core/clustersmngr/cluster"
1212
"github.com/weaveworks/weave-gitops/core/server"

core/server/inventory.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"sync"
1313

1414
helmv2 "github.com/fluxcd/helm-controller/api/v2beta1"
15-
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta2"
15+
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1"
1616
"github.com/fluxcd/pkg/ssa"
1717
"github.com/weaveworks/weave-gitops/core/server/types"
1818
pb "github.com/weaveworks/weave-gitops/pkg/api/core"

core/server/inventory_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
"testing"
99

1010
helmv2 "github.com/fluxcd/helm-controller/api/v2beta1"
11-
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta2"
12-
sourcev1 "github.com/fluxcd/source-controller/api/v1beta2"
11+
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1"
12+
sourcev1 "github.com/fluxcd/source-controller/api/v1"
1313
. "github.com/onsi/gomega"
1414
"github.com/weaveworks/weave-gitops/core/clustersmngr/cluster"
1515
"github.com/weaveworks/weave-gitops/core/server/types"

core/server/objects.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"fmt"
77

88
"github.com/fluxcd/helm-controller/api/v2beta1"
9-
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta2"
9+
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1"
1010
"github.com/hashicorp/go-multierror"
1111
"github.com/weaveworks/weave-gitops/core/clustersmngr"
1212
"github.com/weaveworks/weave-gitops/core/logger"

core/server/objects_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ import (
66
"context"
77
"encoding/base64"
88
"encoding/json"
9+
sourcev1b2 "github.com/fluxcd/source-controller/api/v1beta2"
910
"testing"
1011

1112
helmv2 "github.com/fluxcd/helm-controller/api/v2beta1"
12-
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1beta2"
13-
sourcev1 "github.com/fluxcd/source-controller/api/v1beta2"
13+
kustomizev1 "github.com/fluxcd/kustomize-controller/api/v1"
14+
sourcev1 "github.com/fluxcd/source-controller/api/v1"
1415
. "github.com/onsi/gomega"
1516
"github.com/weaveworks/weave-gitops/core/server/types"
1617
pb "github.com/weaveworks/weave-gitops/pkg/api/core"
@@ -864,12 +865,12 @@ func TestGetObjectSessionObjects(t *testing.T) {
864865
Spec: helmv2.HelmReleaseSpec{},
865866
}
866867

867-
bucket := &sourcev1.Bucket{
868+
bucket := &sourcev1b2.Bucket{
868869
ObjectMeta: metav1.ObjectMeta{
869870
Name: constants.RunDevBucketName,
870871
Namespace: testNS,
871872
},
872-
Spec: sourcev1.BucketSpec{},
873+
Spec: sourcev1b2.BucketSpec{},
873874
}
874875

875876
fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithRuntimeObjects(ns, kust, helm, bucket).Build()
@@ -901,7 +902,7 @@ func TestGetObjectSessionObjects(t *testing.T) {
901902
res, err = c.GetObject(ctx, &pb.GetObjectRequest{
902903
Name: constants.RunDevBucketName,
903904
Namespace: testNS,
904-
Kind: sourcev1.BucketKind,
905+
Kind: sourcev1b2.BucketKind,
905906
ClusterName: testCluster,
906907
})
907908

0 commit comments

Comments
 (0)