Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
superbrothers committed May 6, 2018
1 parent 44fe5c3 commit 0108854
Show file tree
Hide file tree
Showing 1,179 changed files with 610,825 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/view-kubeconfig
/view-kubeconfig.zip
300 changes: 300 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[[override]]
name = "k8s.io/client-go"
version = "7.0.0"

[[constraint]]
name = "k8s.io/kubectl"
branch = "master"

[[override]]
name = "k8s.io/apimachinery"
branch = "release-1.10"

[prune]
go-tests = true
unused-packages = true
non-go = true
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Kazuki Suda <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
VIEW_KUBECONFIG := view-kubeconfig
ARCHIVE_FILE := view-kubeconfig.zip

$(VIEW_KUBECONFIG): main.go Gopkg.lock
@go build -o $@ .

.PHONY: clean
clean:
@$(RM) $(VIEW_KUBECONFIG) $(ARCHIVE_FILE)

.PHONY: archive
archive: $(VIEW_KUBECONFIG) LICENSE plugin.yaml
@zip -r $(ARCHIVE_FILE) $^
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# kubectl plugin view-kubeconfig SERVICEACCOUNT

kubectl plugin that show a kubeconfig to access the apiserver with a specified serviceaccount.

```
$ kubectl plugin view-kubeconfig -h
Show a kubeconfig setting to access the apiserver with a specified serviceaccount.
Examples:
# Show a kubeconfig setting of serviceaccount/default
kubectl plugin view-kubeconfig default
Usage:
kubectl plugin view-kubeconfig [options]
Use "kubectl options" for a list of global command-line options (applies to all commands).
```

## Install the plugin

```
$ curl -sLO https://github.com/superbrothers/kubectl-view-kubeconfig-plugin/releases/download/latest/view-kubeconfig.zip
$ mkdir -p ~/.kube/plugin/view-kubeconfig
$ unzip view-kubeconfig.zip -d ~/.kube/plugins/view-kubeconfig
Archive: view-kubeconfig.zip
creating: ~/.kube/plugins/view-kubeconfig/
inflating: ~/.kube/plugins/view-kubeconfig/plugin.yaml
inflating: ~/.kube/plugins/view-kubeconfig/kill
```

## License

This software is released under the MIT License.
Loading

0 comments on commit 0108854

Please sign in to comment.