Skip to content

Commit 21c0bda

Browse files
neogopherclaude
andcommitted
fix(cli): move namespace conversion into canCreateVClusterWithoutTemplate
Move projectutil.ProjectNamespace() call inside canCreateVClusterWithoutTemplate so callers pass the project name directly, per code review feedback. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 62a8048 commit 21c0bda

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pkg/cli/create_platform.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ func shouldCreateWithTemplate(ctx context.Context, platformClient platform.Clien
377377
return false, nil
378378
}
379379

380-
canSkip, err := canCreateVClusterWithoutTemplate(ctx, platformClient, projectutil.ProjectNamespace(options.Project))
380+
canSkip, err := canCreateVClusterWithoutTemplate(ctx, platformClient, options.Project)
381381
if err != nil {
382382
return false, fmt.Errorf("check create without template: %w", err)
383383
}
@@ -397,7 +397,7 @@ func shouldCreateWithTemplate(ctx context.Context, platformClient platform.Clien
397397
return true, nil
398398
}
399399

400-
func canCreateVClusterWithoutTemplate(ctx context.Context, platformClient platform.Client, projectNamespace string) (bool, error) {
400+
func canCreateVClusterWithoutTemplate(ctx context.Context, platformClient platform.Client, projectName string) (bool, error) {
401401
managementClient, err := platformClient.Management()
402402
if err != nil {
403403
return false, err
@@ -411,7 +411,7 @@ func canCreateVClusterWithoutTemplate(ctx context.Context, platformClient platfo
411411
Version: managementv1.SchemeGroupVersion.Version,
412412
Resource: "virtualclusterinstances",
413413
Subresource: "restricted",
414-
Namespace: projectNamespace,
414+
Namespace: projectutil.ProjectNamespace(projectName),
415415
},
416416
},
417417
},

0 commit comments

Comments
 (0)