Repository navigation
feat(cluster): --network-mode ipv4_nat|ipv6_only on ankracloud create and preflight (ankra-t9c7w.334.1) - #515
Open
CodeStaple wants to merge 1 commit into
Open
CodeStaple wants to merge 1 commit into
CodeStaple wants to merge 1 commit into
Conversation
A zone with no public IPv4 left for the bastion was a dead end from the CLI: the platform preflight answers "create the cluster with network_mode ipv6_only" and nothing could pass it. `ankra cluster ankracloud create` and `preflight` now take `--network-mode ipv4_nat|ipv6_only`, sent as `network_mode` in the create body. Empty keeps the flag out of the body so the server default (ipv4_nat) applies; any other value is refused with a usage error before a request goes out. The embedded ankra-cloud-clusters skill documents the flag and the preflight-then-create flow for an IPv6-only zone. Bead: ankra-t9c7w.334.1
Ankra AI reviewVerdict: looks good. The change threads --network-mode through the shared create/preflight request builder with client-side validation, normalization, and omitempty serialization so the server default still applies when the flag is omitted. Tests cover pass-through on both verbs, normalization of case/whitespace, refusal of unknown values before any request is sent, and omission of the field from the JSON body. Docs, changelog, and skill references are consistent with the implementation. No correctness or security issues found. Reviewed commit 3657d26. This review is read-only and advisory. |
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
ankra cluster ankracloud createandankra cluster ankracloud preflighttake--network-mode ipv4_nat|ipv6_only, sent asnetwork_modein the JSON body the cluster API already accepts. Empty leaves the member out of the body so the server default (ipv4_nat) applies.invalid --network-mode "<value>": must be one of ipv4_nat, ipv6_only (omit it for the server default)before any request goes out.createhelp text explains the two layouts, the flag help names the server default, and the embeddedankra-cloud-clustersskill (SKILL.md and reference.md) documents the preflight-then-create flow for a zone with no public IPv4.Unreleasedentry.Why: a zone with no public IPv4 left for the bastion was a dead end from the CLI. The platform preflight answers
create the cluster with network_mode ipv6_only, and ankra v0.33.1 had no flag to pass it.Tests
cmd/ankracloud_cluster_test.go: the flag reaches both the create and the preflight request (includingIPv4_NATwith whitespace, normalised), the default request carries no network mode, and an unknown value is refused on both verbs with no request sent.internal/client/ankracloud_clusters_test.go: the body carriesnetwork_modewhen set and omits it when empty.go build ./...,go vet ./...,golangci-lint run ./...(0 issues),go test -race -count=1 ./....The ankra-docs CLI reference is generated on release; not edited here.
Bead: ankra-t9c7w.334.1
🤖 Generated with Claude Code