Giter VIP home page Giter VIP logo

client-go2's Introduction

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

Build

This is an experimental type-parameter-aware client that wraps k8s.io/client-go/dynamic (...for now).

Until Go 1.18 is released, use gotip, or the recently released Go 1.18 beta.

Assuming you've got a working kubeconfig (does kubectl get pods work?), you can run this code:

$ go1.18beta1 run ./
2021/12/15 12:08:11 LISTING PODS
2021/12/15 12:08:11 - coredns-558bd4d5db-hjs27
2021/12/15 12:08:11 - coredns-558bd4d5db-vhrtd
2021/12/15 12:08:11 - etcd-kind-control-plane
2021/12/15 12:08:11 - kindnet-c977m
2021/12/15 12:08:11 - kube-apiserver-kind-control-plane
2021/12/15 12:08:11 - kube-controller-manager-kind-control-plane
2021/12/15 12:08:11 - kube-proxy-fgpfd
2021/12/15 12:08:11 - kube-scheduler-kind-control-plane
I1215 12:08:11.086322   32526 shared_informer.go:240] Waiting for caches to sync for /v1, Resource=configmaps
2021/12/15 12:08:11 --> ADD kube-public/cluster-info
2021/12/15 12:08:11 --> ADD kube-system/extension-apiserver-authentication
2021/12/15 12:08:11 --> ADD tekton-pipelines/config-logging
...
2021/12/15 12:08:11 LISTING CONFIGMAPS
2021/12/15 12:08:11 - coredns
2021/12/15 12:08:11 - extension-apiserver-authentication
2021/12/15 12:08:11 - kube-proxy
2021/12/15 12:08:11 - kube-root-ca.crt
2021/12/15 12:08:11 - kubeadm-config
2021/12/15 12:08:11 - 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.

client-go2's People

Contributors

imjasonh avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.