Skip to content

Commit

Permalink
change: rename from resource-status to status
Browse files Browse the repository at this point in the history
  • Loading branch information
bergerx committed Mar 6, 2020
1 parent b8d924c commit 96cfb24
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 44 deletions.
12 changes: 6 additions & 6 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
project_name: resource-status
project_name: status
release:
github:
owner: bergerx
name: kubectl-resource-status
name: kubectl-status
builds:
- id: resource-status
- id: status
goos:
- linux
- windows
Expand All @@ -17,11 +17,11 @@ builds:
- GO111MODULE=on
main: cmd/plugin/main.go
ldflags: -s -w
-X github.com/bergerx/kubectl-resource-status/pkg/version.version=
-X github.com/bergerx/kubectl-status/pkg/version.version=
archives:
- id: resource-status
- id: status
builds:
- resource-status
- status
name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
format_overrides:
- goos: windows
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test:

.PHONY: bin
bin: fmt vet
go build -o bin/resource-status github.com/bergerx/kubectl-resource-status/cmd/plugin
go build -o bin/status github.com/bergerx/kubectl-status/cmd/plugin

.PHONY: fmt
fmt:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# resource-status kubectl
# status kubectl

A `kubectl` plugin to print a human-friendly output that focuses on
the status fields of the resources in kubernetes.

In most cases replacing a `kubectl get ...` with an `kubectl resource-status`
In most cases replacing a `kubectl get ...` with an `kubectl status ...`
would be sufficient.

## Quick Start

```
kubectl krew install resource-status
kubectl resource-status
kubectl krew install status
kubectl status
```

See [usage](doc/USAGE.md) for some sample usage examples.
Expand Down
6 changes: 3 additions & 3 deletions cmd/plugin/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"strings"

"github.com/bergerx/kubectl-resource-status/pkg/plugin"
"github.com/bergerx/kubectl-status/pkg/plugin"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"k8s.io/cli-runtime/pkg/genericclioptions"
Expand All @@ -26,9 +26,9 @@ func RootCmd() *cobra.Command {
f := cmdutil.NewFactory(KubernetesConfigFlags)

cmd := &cobra.Command{
Use: "kubectl resource-status (TYPE[.VERSION][.GROUP] [NAME | -l label] | TYPE[.VERSION][.GROUP]/NAME ...) [flags]",
Use: "kubectl status (TYPE[.VERSION][.GROUP] [NAME | -l label] | TYPE[.VERSION][.GROUP]/NAME ...) [flags]",
//DisableFlagsInUseLine: true,
Short: "Display resource-status for one or many resources",
Short: "Display status for one or many resources",
Long: `.`,
SilenceErrors: true,
SilenceUsage: true,
Expand Down
2 changes: 1 addition & 1 deletion cmd/plugin/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/bergerx/kubectl-resource-status/cmd/plugin/cli"
"github.com/bergerx/kubectl-status/cmd/plugin/cli"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp" // required for GKE
)

Expand Down
45 changes: 25 additions & 20 deletions deploy/krew/plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,50 +1,55 @@
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: resource-status
name: status
spec:
version: "v0.1.0"
version: "v0.2.1"
platforms:
- selector:
matchLabels:
os: linux
arch: amd64
uri: https://github.com/bergerx/kubectl-resource-status/releases/download/v0.1.2/resource-status_linux_amd64.tar.gz
sha256: "f441f485cf8984dfdba6dcd3b24a487d32cc8fcc714d2e8abbc16c374647e5e3"
uri: https://github.com/bergerx/kubectl-status/releases/download/v0.1.2/status_linux_amd64.tar.gz
sha256: "ade0777a7fc76b986102e36c70d7e5484dd7e0649131187f6973f8e885ab2c11"
files:
- from: "./resource-status"
- from: "./status"
to: "."
bin: "resource-status"
- from: LICENCE
to: "."
bin: "status"
- selector:
matchLabels:
os: darwin
arch: amd64
uri: https://github.com/bergerx/kubectl-resource-status/releases/download/v0.1.2/resource-status_darwin_amd64.tar.gz
sha256: "4ae44c0cbabf0cd85249f59af38d1621546c29cc669e49529300520a14123e8c"
uri: https://github.com/bergerx/kubectl-status/releases/download/v0.1.2/status_darwin_amd64.tar.gz
sha256: "848e479388788e859d7d518ca4f4d0f496a8d8f39658e44f96c0411a8690e3de"
files:
- from: "./resource-status"
- from: "./status"
to: "."
- from: LICENCE
to: "."
bin: "resource-status"
bin: "status"
- selector:
matchLabels:
os: windows
arch: amd64
uri: https://github.com/bergerx/kubectl-resource-status/releases/download/v0.1.2/resource-status_windows_amd64.zip
sha256: "fede11f014ab553a33652733ed70f601c1468f7e085dc48a1822be0abd56ebd5"
uri: https://github.com/bergerx/kubectl-status/releases/download/v1.1.2/status_windows_amd64.zip
sha256: "8fac0f8414e8dfd4b6b6a473c3106deccecac6757f244f5854636efc32bc6ab0"
files:
- from: "/resource-status.exe"
- from: "/status.exe"
to: "."
- from: LICENCE
to: "."
bin: "resource-status.exe"
bin: "status.exe"
shortDescription: Show status details of a given resource.
homepage: https://github.com/bergerx/kubectl-resource-status
homepage: https://github.com/bergerx/kubectl-status
caveats: |
Usage:
$ kubectl resource-status
$ kubectl status
For additional options:
$ kubectl resource-status --help
or https://github.com/bergerx/kubectl-resource-status/blob/v0.1.0/doc/USAGE.md
$ kubectl status --help
or https://github.com/bergerx/kubectl-status/blob/master/doc/USAGE.md
description: |
Show status details of a given resource. Doesn't work for all possible
resource types, workload resources are mainly supported.
Show status details of a given resource. Most useful when debugging Pod issues.
16 changes: 8 additions & 8 deletions doc/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
The following assumes you have the plugin installed via

```shell
kubectl krew install resource-status
kubectl krew install status
```

### Show status of some resources

In most cases replacing a `kubectl get ...` with an `kubectl resource-status`
In most cases replacing a `kubectl get ...` with an `kubectl status`
would do it.

```shell
kubectl resource-status pods --all-namespaces # Show status of all pods in all namespaces
kubectl resource-status pods # Show status of all pods in the current namespace
kubectl resource-status nodes # Show status of all nodes
kubectl resource-status pod my-pod # Show status of a particular pod
kubectl resource-status deployment my-dep # Show status of a particular deployment
kubectl resource-status node --selector='node-role.kubernetes.io/master' # Show status of nodes marked as master
kubectl status pods --all-namespaces # Show status of all pods in all namespaces
kubectl status pods # Show status of all pods in the current namespace
kubectl status nodes # Show status of all nodes
kubectl status pod my-pod # Show status of a particular pod
kubectl status deployment my-dep # Show status of a particular deployment
kubectl status node --selector='node-role.kubernetes.io/master' # Show status of nodes marked as master
```

## How it works
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/bergerx/kubectl-resource-status
module github.com/bergerx/kubectl-status

go 1.12

Expand Down

0 comments on commit 96cfb24

Please sign in to comment.