Skip to content

feat: cluster scale command#33

Merged
Davidonium merged 3 commits intomainfrom
feat/cluster-scale
Mar 20, 2026
Merged

feat: cluster scale command#33
Davidonium merged 3 commits intomainfrom
feat/cluster-scale

Conversation

@Davidonium
Copy link
Copy Markdown
Collaborator

Add cluster scale command

Adds a new qcloud cluster scale command that lets users resize a cluster's compute resources and node count in place.

  • Accepts --cpu, --ram, --gpu, --disk, and --nodes flags to adjust any combination of resources in a single operation
  • Resolves the appropriate package from the available catalog when resource flags change; skips the catalog lookup entirely when only node count or disk is adjusted
  • Computes additional disk storage as the delta between requested total disk and the package's included disk, and rejects disk downscales
  • Shows a confirmation prompt with a before/after diff of all changing fields; accepts --force to skip it
  • Optionally waits for the cluster to return to a healthy state with --wait, --wait-timeout, and --wait-poll-interval
  • Supports shell completion for all resource flags

Also fixes cluster update to use util.ExactArgs for consistent error messages, and cleans up bytes.go to use strings.CutSuffix.

- Avoid resolving packages if no package-involved flags are present
- Protect against nodes being 0
- Add testing
�
@Davidonium Davidonium merged commit 45576ff into main Mar 20, 2026
7 checks passed
@Davidonium Davidonium deleted the feat/cluster-scale branch March 20, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant