feat(vks): struct-valued flags for create/update node group#20
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add AWS-CLI-style struct-valued flags (shorthand
key=val,key2=val2or JSON{...}) to the VKS node-group commands, backed by a sharedcli.ParseStructFlaghelper.create-nodegroup— 5 new optional flags--tags— node group tags (key=value, comma-separated →tags)--secondary-subnets— secondary subnet IDs (comma-separated →secondarySubnets)--auto-scale—minSize=2,maxSize=10or JSON →autoScaleConfig--placement-group—type=NEW,placementGroupName=pg-1or JSON →placementGroupConfigDto--upgrade-config—maxSurge=1,maxUnavailable=0,strategy=SURGEor JSON →upgradeConfig(replaces the previously hardcoded default; theSURGE 1/0default still applies when the flag is omitted)update-nodegroup— struct flags + drop deprecated--auto-scale-min/--auto-scale-maxwith struct--auto-scale--upgrade-strategy/--upgrade-max-surge/--upgrade-max-unavailablewith struct--upgrade-config--labels/--taints(deprecated on this endpoint in the API) — usegrn vks update-nodegroup-metadatainsteadupdate-nodegroupremoves:--labels,--taints,--auto-scale-min,--auto-scale-max,--upgrade-strategy,--upgrade-max-surge,--upgrade-max-unavailable. Migrate to--auto-scale/--upgrade-configorupdate-nodegroup-metadata. Captured in theapi-changechangelog fragment.Scope
cli.ParseStructFlagis purely additive — no impact onvserverorcreate-cluster(untouched).Testing
go vet ./...clean;go test ./...passes (5 newParseStructFlagtests); build clean.--helpand--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