From f02c2a7fb63109289c3561fa04b59b6934103f14 Mon Sep 17 00:00:00 2001 From: Gerald Schmidt Date: Tue, 12 Feb 2019 07:55:47 +0000 Subject: [PATCH] refactored release --- README.md | 12 ++++++++++-- kubectl-match-name.yaml | 40 --------------------------------------- match-name.yaml | 42 +++++++++++++++++++++++++++++++++++++++++ xcompile.sh | 2 +- 4 files changed, 53 insertions(+), 43 deletions(-) delete mode 100644 kubectl-match-name.yaml create mode 100644 match-name.yaml diff --git a/README.md b/README.md index bcf0096..7784e4d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/kubectl-match-name.yaml b/kubectl-match-name.yaml deleted file mode 100644 index 27eedcd..0000000 --- a/kubectl-match-name.yaml +++ /dev/null @@ -1,40 +0,0 @@ -apiVersion: krew.googlecontainertools.github.com/v1alpha2 -kind: Plugin -metadata: - name: kubectl-match-name -spec: - version: "v0.1.2" - platforms: - - selector: - matchExpressions: - - {key: os, operator: In, values: [darwin]} - url: https://github.com/gerald1248/kubectl-match-name/releases/download/v0.1.0/kubectl-match_name-darwin-amd64.zip - sha256: "789e8be9da2813d92261456e57aa7f7bf283781b7358becd64d57b584d4e69d2" - files: - - from: "/darwin/kubectl-match_name" - to: "." - bin: "./kubectl-match_name" - - selector: - matchExpressions: - - {key: os, operator: In, values: [linux]} - url: https://github.com/gerald1248/kubectl-match-name/releases/download/v0.1.0/kubectl-match_name-linux-amd64.zip - sha256: "8027c16544ad7749d31174e762d09dc49324948e15fff71ada8e1e0620a506d2" - files: - - from: "/linux/kubectl-match_name" - to: "." - bin: "./kubectl-match_name" - - selector: - matchExpressions: - - {key: os, operator: In, values: [windows]} - url: https://github.com/gerald1248/kubectl-match-name/releases/download/v0.1.2/kubectl-match_name-windows-amd64.zip - sha256: "49382ef4e5e104a73a1c2aa6beac377deac5ce23fd890f1b46282f21c778fe42" - files: - - from: "/windows/kubectl-match_name.exe" - 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. diff --git a/match-name.yaml b/match-name.yaml new file mode 100644 index 0000000..c811971 --- /dev/null +++ b/match-name.yaml @@ -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. diff --git a/xcompile.sh b/xcompile.sh index 38d8033..4fa8493 100755 --- a/xcompile.sh +++ b/xcompile.sh @@ -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