diff --git a/Makefile b/Makefile index 63bc48a..3151e83 100644 --- a/Makefile +++ b/Makefile @@ -4,15 +4,15 @@ VERSION=$(shell git rev-parse --short HEAD) BUILD=$(shell date +%FT%T%z) build-linux: - @GOARCH=amd64 CGO_ENABLED=1 GOOS=linux go build -ldflags "-s -w -X main.Version=${VERSION} -X main.Build=${BUILD}" -o bin/kube-resource_linux + @GOARCH=amd64 CGO_ENABLED=1 GOOS=linux go build -ldflags "-s -w -X main.Version=${VERSION} -X main.Build=${BUILD}" -o bin/linux/kube-resource build-osx: - @GOARCH=amd64 CGO_ENABLED=1 GOOS=darwin go build -ldflags "-s -w -X main.Version=${VERSION} -X main.Build=${BUILD}" -o bin/kube-resource_darwin + @GOARCH=amd64 CGO_ENABLED=1 GOOS=darwin go build -ldflags "-s -w -X main.Version=${VERSION} -X main.Build=${BUILD}" -o bin/darwin/kube-resource build-windows: - @GOARCH=amd64 CGO_ENABLED=1 GOOS=windows go build -ldflags "-s -w -X main.Version=${VERSION} -X main.Build=${BUILD}" -o bin/kube-resource_windows + @GOARCH=amd64 CGO_ENABLED=1 GOOS=windows go build -ldflags "-s -w -X main.Version=${VERSION} -X main.Build=${BUILD}" -o bin/win/kube-resource clean: - @if [ -f bin/kube-resource_linux ] ; then rm bin/kube-resource_linux ; fi - @if [ -f bin/kube-resource_darwin ] ; then rm bin/kube-resource_darwin ; fi - @if [ -f bin/kube-resource_windows ] ; then rm bin/kube-resource_windows ; fi \ No newline at end of file + @if [ -f bin/linux/kube-resource ] ; then rm bin/linux/ ; fi + @if [ -f bin/darwin/kube-resource ] ; then rm bin/darwin/ ; fi + @if [ -f bin/win/kube-resource ] ; then rm bin/win/ ; fi \ No newline at end of file diff --git a/README.md b/README.md index e69de29..faf867d 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,33 @@ +# kubernetes-resource-list + +This app can show a list of Kubernetes API resources and subresources + +## Why + +When I was writing my RBAC configuration, I couldn't find resources, especially subresources, and the official kubernetes documentation doesn't list them anywhere. + +## How To Use +```shell +$ ./kube-resource --help +Usage of ./kube-resource: + -c, --kubeconfig string (optional) absolute path to the kubeconfig file + -p, --prefer (optional) only display the supported resources with the version preferred by the server. + -s, --search string (optional) only display the supported resources for a group and version. + -v, --version show app version +``` + +### Example +```shell +$ ./kube-resource +APIGROUPS GROUPVERSION NAME VERBS +core v1 bindings [create] +core v1 componentstatuses [get list] +core v1 configmaps [create delete deletecollection get list patch update watch] +core v1 endpoints [create delete deletecollection get list patch update watch] +core v1 events [create delete deletecollection get list patch update watch] +core v1 limitranges [create delete deletec + +... +.. +. +``` \ No newline at end of file