refactor: postpone spec resolver initialisation when creating Deployment

This commit is contained in:
Pavel Sviderski
2025-03-24 21:56:30 +10:00
parent 2d923380a3
commit 58b51b974c
10 changed files with 48 additions and 90 deletions
+1 -6
View File
@@ -88,12 +88,7 @@ func scale(ctx context.Context, uncli *cli.CLI, opts scaleOptions) error {
}
spec.Replicas = opts.replicas
deployment, err := clusterClient.NewDeployment(ctx, spec, nil)
if err != nil {
return fmt.Errorf("create deployment: %w", err)
}
deployment := clusterClient.NewDeployment(spec, nil)
plan, err := deployment.Plan(ctx)
if err != nil {
return fmt.Errorf("plan deployment: %w", err)