fix(vks): make update-cluster fields optional per spec#40
Merged
Conversation
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.
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.
What
UpdateClusterDtoin the VKS spec no longer marks any field as required. The CLI was out of sync: it forced--k8s-versionand--whitelist-node-cidrsviaMarkFlagRequiredand always sentversion+whitelistNodeCIDRsin the PUT body.Changes
update-clusternow requires only--cluster-id.Changed()(mirrorsupdate-nodegroup).nothing to update: provide at least one of --k8s-version, --whitelist-node-cidrs, --load-balancer-plugin, or --block-store-csi-plugin.body) instead of unconditional version/whitelist lines.docs/commands/vks/update-cluster.md) updated:--k8s-versionand--whitelist-node-cidrsmarked Required: No, synopsis brackets them, and a plugin-only example added.Verify
go vet, full test suite (CGO_ENABLED=1 ... -linkmode=external), andCGO_ENABLED=0 go buildall pass.--k8s-versionalone sends onlyversion.