From eb9f53d816eb3af1d26aa2b982e85d77a8c7b370 Mon Sep 17 00:00:00 2001 From: Yuwen Ma Date: Tue, 9 Jul 2024 08:32:12 +0000 Subject: [PATCH] revert cbwp export --- .../cloudbuild/workerpool_controller.go | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/pkg/controller/direct/cloudbuild/workerpool_controller.go b/pkg/controller/direct/cloudbuild/workerpool_controller.go index f887d81bef..5a23ce3482 100644 --- a/pkg/controller/direct/cloudbuild/workerpool_controller.go +++ b/pkg/controller/direct/cloudbuild/workerpool_controller.go @@ -302,28 +302,7 @@ func (a *Adapter) Update(ctx context.Context, u *unstructured.Unstructured) erro } func (a *Adapter) Export(ctx context.Context) (*unstructured.Unstructured, error) { - u := &unstructured.Unstructured{} - - apiVersion, kind := krm.GroupVersionKind.ToAPIVersionAndKind() - u.SetAPIVersion(apiVersion) - u.SetKind(kind) - - wp := &krm.CloudBuildWorkerPool{} - wp.Spec.DisplayName = a.actual.DisplayName - wp.Spec.ResourceID = &a.actual.Name - - mapCtx := &MapContext{} - wp.Spec.PrivatePoolConfig = PrivatePoolV1Config_FromProto(mapCtx, a.actual.GetPrivatePoolV1Config()) - if mapCtx.Err() != nil { - return nil, mapCtx.Err() - } - - obj, err := runtime.DefaultUnstructuredConverter.ToUnstructured(wp) - if err != nil { - return nil, err - } - u.Object = obj - return u, nil + return nil, nil } // Delete implements the Adapter interface.