Skip to content

feat(vks): struct-valued flags for create/update node group#20

Merged
vks-team merged 1 commit into
mainfrom
feat/nodegroup-struct-flags
Jun 30, 2026
Merged

feat(vks): struct-valued flags for create/update node group#20
vks-team merged 1 commit into
mainfrom
feat/nodegroup-struct-flags

Conversation

@vks-team

Copy link
Copy Markdown
Contributor

Summary

Add AWS-CLI-style struct-valued flags (shorthand key=val,key2=val2 or JSON {...}) to the VKS node-group commands, backed by a shared cli.ParseStructFlag helper.

create-nodegroup — 5 new optional flags

  • --tags — node group tags (key=value, comma-separated → tags)
  • --secondary-subnets — secondary subnet IDs (comma-separated → secondarySubnets)
  • --auto-scaleminSize=2,maxSize=10 or JSON → autoScaleConfig
  • --placement-grouptype=NEW,placementGroupName=pg-1 or JSON → placementGroupConfigDto
  • --upgrade-configmaxSurge=1,maxUnavailable=0,strategy=SURGE or JSON → upgradeConfig (replaces the previously hardcoded default; the SURGE 1/0 default still applies when the flag is omitted)

update-nodegroup — struct flags + drop deprecated

  • Replaced --auto-scale-min/--auto-scale-max with struct --auto-scale
  • Replaced --upgrade-strategy/--upgrade-max-surge/--upgrade-max-unavailable with struct --upgrade-config
  • Removed --labels/--taints (deprecated on this endpoint in the API) — use grn vks update-nodegroup-metadata instead

⚠️ Breaking change

update-nodegroup removes: --labels, --taints, --auto-scale-min, --auto-scale-max, --upgrade-strategy, --upgrade-max-surge, --upgrade-max-unavailable. Migrate to --auto-scale/--upgrade-config or update-nodegroup-metadata. Captured in the api-change changelog fragment.

Scope

  • New cli.ParseStructFlag is purely additive — no impact on vserver or create-cluster (untouched).

Testing

  • go vet ./... clean; go test ./... passes (5 new ParseStructFlag tests); build clean.
  • Verified via --help and --dry-run: 5 new flags present on create-nodegroup; 0 deprecated flags remain on update-nodegroup; struct parse errors surface correctly (incl. dry-run).

🤖 Generated with Claude Code

Add AWS-style struct flags (shorthand key=val,key2=val2 or JSON) backed by
a shared cli.ParseStructFlag helper.

create-nodegroup: add --tags, --secondary-subnets, --auto-scale,
--placement-group, and --upgrade-config (replaces the hardcoded SURGE 1/0
default, still applied when the flag is omitted).

update-nodegroup: replace --auto-scale-min/max and
--upgrade-strategy/max-surge/max-unavailable with struct --auto-scale and
--upgrade-config. Drop the API-deprecated --labels/--taints (use
update-nodegroup-metadata instead).

BREAKING CHANGE: update-nodegroup removes --labels, --taints,
--auto-scale-min, --auto-scale-max, --upgrade-strategy, --upgrade-max-surge,
and --upgrade-max-unavailable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vks-team vks-team merged commit ef64c02 into main Jun 30, 2026
4 checks passed
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