Skip to content

fix(vks): make update-cluster fields optional per spec#40

Merged
vks-team merged 1 commit into
mainfrom
fix/update-cluster-optional-fields
Jul 7, 2026
Merged

fix(vks): make update-cluster fields optional per spec#40
vks-team merged 1 commit into
mainfrom
fix/update-cluster-optional-fields

Conversation

@vks-team

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

Copy link
Copy Markdown
Contributor

What

UpdateClusterDto in the VKS spec no longer marks any field as required. The CLI was out of sync: it forced --k8s-version and --whitelist-node-cidrs via MarkFlagRequired and always sent version + whitelistNodeCIDRs in the PUT body.

Changes

  • update-cluster now requires only --cluster-id.
  • Body is built as a partial update — each field is sent only when its flag is Changed() (mirrors update-nodegroup).
  • Rejects a no-op call: nothing to update: provide at least one of --k8s-version, --whitelist-node-cidrs, --load-balancer-plugin, or --block-store-csi-plugin.
  • Dry-run now prints the actual payload (ranges over body) instead of unconditional version/whitelist lines.
  • Docs (docs/commands/vks/update-cluster.md) updated: --k8s-version and --whitelist-node-cidrs marked Required: No, synopsis brackets them, and a plugin-only example added.

Verify

  • go vet, full test suite (CGO_ENABLED=1 ... -linkmode=external), and CGO_ENABLED=0 go build all pass.
  • Manual: plugin-only update works; no-field call errors; --k8s-version alone sends only version.

UpdateClusterDto no longer marks any field required. Drop the forced
--k8s-version and --whitelist-node-cidrs requirements, send each body
field only when its flag is set (partial update), and reject a call
that changes nothing. Docs updated to match.
@vks-team vks-team merged commit 9423eed into main Jul 7, 2026
6 checks passed
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