feat(vks): add 8 missing VKS commands#15
Merged
Conversation
Add brainstorming design for 8 new grn vks commands: upgrade-nodegroup-version, config-auto-healing, update-nodegroup-metadata, get-cluster-events, get-nodegroup-events, list-cluster-versions, generate-kubeconfig, update-kubeconfig. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add commands covering VKS API endpoints the CLI did not expose: - update-kubeconfig / generate-kubeconfig (kubeconfig fetch + merge into ~/.kube/config; async generation) - upgrade-nodegroup-version, config-auto-healing, update-nodegroup-metadata - list-cluster-versions, get-cluster-events, get-nodegroup-events Supporting changes: - client: add Patch method (for PATCH endpoints) - new internal/kubeconfig package: YAML load/merge/write (gopkg.in/yaml.v3) - auth: add test-only SetToken seam - helpers: buildEventsQuery (0-based pagination) - tests for client.Patch, body/query builders, and kubeconfig merge - docs pages, mkdocs nav, README, CLAUDE.md, changelog fragments Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
Adds 8
grn vkscommands covering VKS API endpoints the CLI did not previously expose, closing the gap against the VKS OpenAPI spec.Kubeconfig (EKS-style)
update-kubeconfig— fetch the cluster kubeconfig and merge it into~/.kube/config(or$KUBECONFIG/--kubeconfig); context defaults tovks_<cluster-id>; supports--alias,--no-set-context,--dry-run.generate-kubeconfig— request (async) generation/renewal with--expiration-days.Cluster / nodegroup ops
upgrade-nodegroup-version(--k8s-version)config-auto-healing(PATCH)update-nodegroup-metadata(PATCH labels/tags/taints)Discovery / observability
list-cluster-versions,get-cluster-events,get-nodegroup-events(0-based pagination)Supporting changes
client.Patchmethod for PATCH endpointsinternal/kubeconfigpackage (YAML load/merge/write viagopkg.in/yaml.v3); preserves existing contexts, de-dupes, writes 0600/0700auth.SetTokentest-only seam;buildEventsQueryhelperBuilt from a design spec and implementation plan under
docs/superpowers/.Test Plan
CGO_ENABLED=1 go test -ldflags='-linkmode=external' ./...— all packages PASSgo vet ./...clean;CGO_ENABLED=0 go buildcleangrn vks --helplists all 8 new commands; per-command--helpshows expected flagsupdate-kubeconfig/generate-kubeconfigagainst a live VKS cluster--unhealthy-rangesemantics with the API team🤖 Generated with Claude Code