feat(vks): add remaining optional fields to create-cluster#29
Merged
Conversation
Mirror the create-nodegroup treatment: expose the optional CreateClusterDto fields create-cluster was missing. - simple flags: --secondary-subnets, --list-subnet-ids, --node-netmask-size, --service-endpoint (was hardcoded false), --az-strategy (was hardcoded SINGLE) - struct flags (shorthand or JSON): --auto-upgrade-config, --auto-healing-config Extend cli.ParseStructFlag with bool-field coercion (ParseStructFlagTyped) so --auto-healing-config's enableAutoHealing works in shorthand. --fleet-config was intentionally left out. Note: autoUpgradeConfig.weekdays with multiple days must use JSON (shorthand splits on commas). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
241b1d0 to
c09cacc
Compare
Per the CreateClusterDto spec neither subnetId nor listSubnetIds is required, so drop --subnet-id from the required set and send subnetId only when provided. Users can pass --subnet-id, --list-subnet-ids, or neither; the server validates. 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
Give
create-clusterthe remaining optionalCreateClusterDtofields it was missing (mirroring the create-nodegroup struct-flags treatment). Control-plane-only behavior from v1.5.0 is unchanged.New flags
--secondary-subnets,--list-subnet-ids,--node-netmask-size,--service-endpoint(was hardcodedfalse),--az-strategy(was hardcodedSINGLE)--auto-upgrade-config,--auto-healing-configHelper
cli.ParseStructFlaggains bool-field coercion viaParseStructFlagTyped(value, intFields, boolFields)(old signature unchanged); used for--auto-healing-config'senableAutoHealing.--fleet-configintentionally omitted. No inline node group (create workers withcreate-nodegroup).Caveat
--auto-upgrade-configwith multipleweekdaysmust use JSON (shorthand splits on commas) — documented.Testing
ParseStructFlagTypedbool coercion + bad-bool error.go vet ./...clean; fullgo test ./...passes; build clean; verified via--help+ dry-run.🤖 Generated with Claude Code