1
0
Fork 0
mirror of https://github.com/imjasonh/client-go2 synced 2026-07-18 22:58:43 +00:00

initial commit

This commit is contained in:
Jason Hall 2021-09-09 12:29:21 -04:00
commit a09c449fd7
4 changed files with 591 additions and 0 deletions

32
README.md Normal file
View file

@ -0,0 +1,32 @@
# Experimenting with `go-client` and Go generics
This is an experimental type-parameter-aware client that wraps [`k8s.io/client-go/dynamic`](https://pkg.go.dev/k8s.io/client-go/dynamic).
Until Go 1.18 is released, use [`gotip`](https://pkg.go.dev/golang.org/dl/gotip)
Assuming you've got a working kubeconfig (does `kubectl get pods` work?), you can run this code:
```
$ gotip run ./
2021/09/09 12:26:06 PODS
2021/09/09 12:26:06 - coredns-558bd4d5db-hjs27
2021/09/09 12:26:06 - coredns-558bd4d5db-vhrtd
2021/09/09 12:26:06 - etcd-kind-control-plane
2021/09/09 12:26:06 - kindnet-c977m
2021/09/09 12:26:06 - kube-apiserver-kind-control-plane
2021/09/09 12:26:06 - kube-controller-manager-kind-control-plane
2021/09/09 12:26:06 - kube-proxy-fgpfd
2021/09/09 12:26:06 - kube-scheduler-kind-control-plane
2021/09/09 12:26:06 CONFIGMAPS
2021/09/09 12:26:06 - coredns
2021/09/09 12:26:06 - extension-apiserver-authentication
2021/09/09 12:26:06 - kube-proxy
2021/09/09 12:26:06 - kube-root-ca.crt
2021/09/09 12:26:06 - kubeadm-config
2021/09/09 12:26:06 - kubelet-config-1.21
```
# THIS IS AN EXPERIMENT
None of this is anywhere near set in stone.
The name `client-go2` is a placeholder, and a joke.