Skip to content

feat(vks): add 8 missing VKS commands#15

Merged
vks-team merged 2 commits into
mainfrom
feat/vks-missing-commands
Jun 13, 2026
Merged

feat(vks): add 8 missing VKS commands#15
vks-team merged 2 commits into
mainfrom
feat/vks-missing-commands

Conversation

@vks-team

Copy link
Copy Markdown
Contributor

Summary

Adds 8 grn vks commands 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 to vks_<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.Patch method for PATCH endpoints
  • new internal/kubeconfig package (YAML load/merge/write via gopkg.in/yaml.v3); preserves existing contexts, de-dupes, writes 0600/0700
  • auth.SetToken test-only seam; buildEventsQuery helper
  • unit tests (client.Patch, body/query builders, kubeconfig merge)
  • docs pages + mkdocs nav + README + CLAUDE.md + changelog fragments

Built from a design spec and implementation plan under docs/superpowers/.

Test Plan

  • CGO_ENABLED=1 go test -ldflags='-linkmode=external' ./... — all packages PASS
  • go vet ./... clean; CGO_ENABLED=0 go build clean
  • grn vks --help lists all 8 new commands; per-command --help shows expected flags
  • Reviewer: smoke-test update-kubeconfig/generate-kubeconfig against a live VKS cluster
  • Reviewer: confirm --unhealthy-range semantics with the API team

Note: tests in this repo require the external-linker flag on macOS 26 + Go 1.22.2 (dyld: missing LC_UUID); see commands above.

🤖 Generated with Claude Code

tytv2 and others added 2 commits June 13, 2026 20:50
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>
@vks-team vks-team merged commit eb66874 into main Jun 13, 2026
4 checks passed
@vks-team vks-team deleted the feat/vks-missing-commands branch June 14, 2026 08:43
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