Skip to content
This repository was archived by the owner on Apr 24, 2024. It is now read-only.

Commit 51a87fc

Browse files
committed
Re-use global schema for APIExport watch client
1 parent 754a2c1 commit 51a87fc

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

main.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,6 @@ func main() {
165165
// APIExport's virtual workspace. It blocks until the controller APIExport VirtualWorkspaceURLsReady condition
166166
// becomes truthy, which happens when the APIExport is bound for the first time.
167167
func restConfigForAPIExport(ctx context.Context, cfg *rest.Config, apiExportName string) (*rest.Config, error) {
168-
scheme := runtime.NewScheme()
169-
if err := apisv1alpha1.AddToScheme(scheme); err != nil {
170-
return nil, fmt.Errorf("error adding apis.kcp.dev/v1alpha1 to scheme: %w", err)
171-
}
172-
173168
apiExportClient, err := client.NewWithWatch(cfg, client.Options{Scheme: scheme})
174169
if err != nil {
175170
return nil, fmt.Errorf("error creating APIExport client: %w", err)

0 commit comments

Comments
 (0)