Skip to content

feat(vks): optionally attach a node group in create-cluster (nodeGroup) - #31

Closed
vks-team wants to merge 1 commit into
mainfrom
feat/create-cluster-nodegroup-optional
Closed

feat(vks): optionally attach a node group in create-cluster (nodeGroup)#31
vks-team wants to merge 1 commit into
mainfrom
feat/create-cluster-nodegroup-optional

Conversation

@vks-team

@vks-team vks-team commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Context — spec review

The updated VKS spec (CreateClusterComboDto, the POST /v1/clusters body) now has:

  • nodeGroup (object, optional) — attach a node group at creation.
  • nodeGroups (array) — deprecated.

And UpdateNodeGroupDto now has required: none (all body fields optional).

Review result

Item Status
create-cluster: add optional nodeGroup, don't use deprecated nodeGroups ✅ implemented here
update-nodegroup: all fields optional already compliant — the CLI already treats numNodes/securityGroups/autoScaleConfig/upgradeConfig as optional (only the path params are required). No code change.

Changes (create-cluster)

Optional inline node group, attached only when --node-group-name is set; then --flavor-id, --disk-type, --ssh-key-id are required. Optional: --os, --disk-size, --num-nodes, --private-nodes, --security-groups, --labels, --taints. Omit all → control plane only (v1.5.0/v1.6.0 behavior preserved).

  • Sent under the singular nodeGroup object; the deprecated nodeGroups array is never sent.
  • Node group subnetId reuses the cluster --subnet-id when provided.
  • Dry-run validates node-group name pattern + disk/node ranges when attaching.

Behavior

  • No node-group flags → no nodeGroup in body.
  • --node-group-name without the required trio → Error: attaching a node group requires: ....
  • Full attach → dry-run OK.

Testing

  • go vet ./... clean; full go test ./... passes; build clean; verified 3 dry-run scenarios via the binary.

⚠️ Doc overlap

This edits docs/commands/vks/create-cluster.md in its current (definition-list) format. PR #30 (AWS-CLI-style docs reformat) also rewrites this file — whichever merges second needs a quick conflict resolution (keep both: the new node-group options in the EKS format).

🤖 Generated with Claude Code

The updated spec adds an optional singular nodeGroup object to the create
request and deprecates the nodeGroups array. Add optional node-group flags to
create-cluster: a node group is attached only when --node-group-name is set
(then --flavor-id/--disk-type/--ssh-key-id are required), sent under the
nodeGroup field. Omit them and only the control plane is created.

Reviewed update-nodegroup against the new UpdateNodeGroupDto (required=none):
the CLI already treats all body fields as optional, so no change is needed there.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vks-team vks-team closed this Jul 6, 2026
@vks-team
vks-team deleted the feat/create-cluster-nodegroup-optional branch July 6, 2026 11:34
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