Skip to content

Commit

Permalink
refactored release
Browse files Browse the repository at this point in the history
  • Loading branch information
gerald1248 committed Feb 12, 2019
1 parent 38a28a2 commit f02c2a7
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 43 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
kubectl-match-name
==================

Access pods quickly without using the clipboard or listing all pods first. Here's a typical use case:
Access pods quickly without using the clipboard or listing all pods first. Here are some typical use cases:

```
$ kubectl logs `kubectl match-name proxy` -f
I0207 12:51:25.322909 1 server.go:444] Version: v1.10.0
...
$ kubectl match-name proxy
kube-proxy-cvtm5
$ kubectl match-name -k svc .
default-http-backend
$ kubectl match-name minikube
etcd-minikube kube-addon-manager-minikube kube-apiserver-minikube kube-controller-manager-minikube kube-scheduler-minikube
```

What have we gained? This line replaces two common approaches. In many cases we would use the clipboard or type in the hash component of the name:
Let's take a closer look at the first example. What have we gained? This line replaces two common approaches. In many cases we would use the clipboard or type in the hash component of the name:

```
$ kubectl get po | grep proxy
Expand Down
40 changes: 0 additions & 40 deletions kubectl-match-name.yaml

This file was deleted.

42 changes: 42 additions & 0 deletions match-name.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: match-name
spec:
version: "v0.1.3"
platforms:
- selector:
matchLabels:
os: darwin
arch: amd64
uri: https://github.com/gerald1248/kubectl-match-name/releases/download/v0.1.3/kubectl-match_name-darwin-amd64.zip
sha256: 69c72e56d96688f6d32d21d1ca111573c6568ef9f4529e8616f97e1f4d97c0d6
files:
- from: "*"
to: "."
bin: kubectl-match_name
- selector:
matchLabels:
os: linux
arch: amd64
uri: https://github.com/gerald1248/kubectl-match-name/releases/download/v0.1.3/kubectl-match_name-linux-amd64.zip
sha256: ad1cddc5eb0f97ff7c872228fa871a09967ed00a0d10c8c36a05463dff70f413
files:
- from: "*"
to: "."
bin: kubectl-match_name
- selector:
matchLabels:
os: windows
arch: amd64
uri: https://github.com/gerald1248/kubectl-match-name/releases/download/v0.1.3/kubectl-match_name-windows-amd64.zip
sha256: aa787ebf95abdd9cebba2010b52beea3d5b9b976ff31b5f9102e1f711aff39e8
files:
- from: "*"
to: "."
bin: kubectl-match_name.exe
shortDescription: Match names of pods and other API objects
caveats: |
API object coverage is incomplete.
description: |
This plugin allows fast regex matching for the names of pods and other API objects. It reduces typing and simplifies automation.
2 changes: 1 addition & 1 deletion xcompile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ for OS in windows linux darwin; do
if [ "${OS}" == "windows" ]; then
mv windows/kubectl-match_name windows/kubectl-match_name.exe
fi
zip kubectl-match_name-${OS}-amd64.zip ${OS}/kubectl-match_name*
zip -jr kubectl-match_name-${OS}-amd64.zip ${OS}/kubectl-match_name*
rm -rf ${OS}/
shasum -a 256 kubectl-match_name-${OS}-amd64.zip >>release.txt
done

0 comments on commit f02c2a7

Please sign in to comment.