mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-27 03:23:34 +00:00
refactor: postpone spec resolver initialisation when creating Deployment
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user