fix(vks): --secondary-subnets takes CIDRs, not subnet IDs#44
Open
vks-team wants to merge 1 commit into
Open
Conversation
The API field secondarySubnets expects address ranges (e.g. 10.5.60.0/22), but the help text and docs said "Secondary subnet IDs" and used sub-*/sec-sub-* examples. An agent or user following that guidance builds a body the backend rejects. Correct the flag help, the option description, and both examples to CIDR strings. Behavior is unchanged (the value is forwarded verbatim).
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.
Root cause
The VKS API field
secondarySubnetsexpects CIDR strings (address ranges, e.g.10.5.60.0/22) — the spec example is["10.200.27.0/24", "10.200.28.0/24"]. But the CLI's--secondary-subnetshelp text and thecreate-clusterdocs described them as "Secondary subnet IDs" and usedsub-…examples.This mislabeling was reinforced in #42. Anyone (or any agent) following the guidance builds a request body the backend rejects. The parallel bug in
greennode-mcp(SubnetItem extractingsec-sub-*uuids, guides/docstrings saying "Secondary subnet IDs") was fixed separately.Changes
create_cluster.go:--secondary-subnetshelp now reads "Secondary subnet CIDRs, comma-separated, e.g. 10.5.60.0/22 … NOT subnet IDs".docs/commands/vks/create-cluster.md: option description clarified (CIDRs, notsec-sub-…IDs), syntax + both examples use CIDR strings.Behavior is unchanged — the CLI forwards the value verbatim; only the guidance was wrong.
Verify
go vet,CGO_ENABLED=0 go build, and--helpoutput confirmed.