1
0
Fork 0
mirror of https://github.com/imjasonh/client-go2 synced 2026-07-08 17:16:47 +00:00
client-go2/README.md
Jason Hall 63505cf9fd
update readme
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-07-27 17:28:29 -04:00

1.2 KiB

Experimenting with k8s.io/client-go and Go generics

Build

This is an experimental type-parameter-aware client that wraps k8s.io/client-go/rest, in about 500 lines of mostly-vibe-coded Go.

Features

  • Type-safe generic client - Work with strongly-typed Kubernetes objects instead of unstructured.Unstructured
  • Zero code generation - Uses Go generics instead of code generation
  • Full CRUD operations - List, Get, Create, Update, Delete, and Patch support
  • Informer support - Watch for changes with type-safe event handlers
  • Automatic GVR inference - No need to manually specify GroupVersionResource for standard Kubernetes types

Usage

See the example

Testing

Unit tests against a mock REST client:

make test

End-to-end tests against a real K8s cluster:

make e2e

⚠️ THIS IS AN EXPERIMENT

This is just for demo purposes.

The name client-go2 is a placeholder, and a joke.