Skip to content

Commit

Permalink
Merge pull request #7 from rajatjindal/krew-release-bot-1
Browse files Browse the repository at this point in the history
Krew release bot and moving too new org
  • Loading branch information
mhausenblas committed Feb 9, 2020
2 parents 5c0b779 + f591903 commit 431d866
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 29 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ jobs:
run: make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update new version in krew-index
uses: rajatjindal/krew-release-bot@v0.0.36
with:
krew_template_file: deploy/krew/fleet.yaml
4 changes: 2 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project_name: fleet
release:
github:
owner: mhausenblas
owner: kubectl-plus
name: kcf
builds:
- id: fleet
Expand All @@ -19,7 +19,7 @@ builds:
- GO111MODULE=on
main: cmd/fleet/main.go
ldflags: -s -w
-X github.com/mhausenblas/kcf/pkg/version.version=
-X github.com/kubectl-plus/kcf/pkg/version.version=
archives:
- id: fleet
builds:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ the control plane version or API server endpoint are displayed, as well as selec
stats, for example, the number of worker nodes or namespaces found in the cluster.

Note that you can also use it standalone, simply download the binary for your platform
from the [release page](https://github.com/mhausenblas/kcf/releases).
from the [release page](https://github.com/kubectl-plus/kcf/releases).

## Getting started

Expand Down
2 changes: 1 addition & 1 deletion cmd/fleet/cli/details.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cli

import (
"github.com/mhausenblas/kcf/pkg/fleet"
"github.com/kubectl-plus/kcf/pkg/fleet"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/fleet/cli/resources.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cli

import (
"github.com/mhausenblas/kcf/pkg/fleet"
"github.com/kubectl-plus/kcf/pkg/fleet"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/fleet/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"strings"

"github.com/mhausenblas/kcf/pkg/fleet"
"github.com/kubectl-plus/kcf/pkg/fleet"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down
2 changes: 1 addition & 1 deletion cmd/fleet/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/mhausenblas/kcf/cmd/fleet/cli"
"github.com/kubectl-plus/kcf/cmd/fleet/cli"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp" // required for GKE
)

Expand Down
15 changes: 6 additions & 9 deletions deploy/krew/fleet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ kind: Plugin
metadata:
name: fleet
spec:
version: "v0.1.4"
version: {{ .TagName }}
platforms:
- selector:
matchLabels:
os: linux
arch: amd64
uri: https://github.com/mhausenblas/kcf/releases/download/v0.1.4/fleet_linux_amd64.tar.gz
sha256: "56f0536804bc5230cb0a4e4c87861c27828fee1b71aab1b192fa54c75e090db1"
{{addURIAndSha "https://github.com/kubectl-plus/kcf/releases/download/{{ .TagName }}/fleet_linux_amd64.tar.gz" .TagName }}
files:
- from: "./fleet"
to: "."
Expand All @@ -21,8 +20,7 @@ spec:
matchLabels:
os: darwin
arch: amd64
uri: https://github.com/mhausenblas/kcf/releases/download/v0.1.4/fleet_darwin_amd64.tar.gz
sha256: "867f1c40b90334f4416062efb4651dca037defc31a0881575c0c408486487d6f"
{{addURIAndSha "https://github.com/kubectl-plus/kcf/releases/download/{{ .TagName }}/fleet_darwin_amd64.tar.gz" .TagName }}
files:
- from: "./fleet"
to: "."
Expand All @@ -33,23 +31,22 @@ spec:
matchLabels:
os: windows
arch: amd64
uri: https://github.com/mhausenblas/kcf/releases/download/v0.1.4/fleet_windows_amd64.zip
sha256: "33e29a5f65ba8ec16008fd51a9b62d8f9f0d25a066ea700d5cffaf0fa4757f1a"
{{addURIAndSha "https://github.com/kubectl-plus/kcf/releases/download/{{ .TagName }}/fleet_windows_amd64.zip" .TagName }}
files:
- from: "/fleet.exe"
to: "."
- from: "./LICENSE"
to: "."
bin: "fleet.exe"
shortDescription: Shows config and resources of a fleet of clusters
homepage: https://github.com/mhausenblas/kcf
homepage: https://github.com/kubectl-plus/kcf
caveats: |
Usage:
$ kubectl fleet
For additional options:
$ kubectl fleet --help
or https://github.com/mhausenblas/kcf/blob/v0.1.4/doc/USAGE.md
or https://github.com/kubectl-plus/kcf/blob/v0.1.4/doc/USAGE.md
description: |
Allows to get an overview and details on a fleet of Kubernetes clusters.
Expand Down
18 changes: 7 additions & 11 deletions doc/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ In order to be able to do that, make sure you have [krew installed](https://gith
$ kubectl krew install fleet
```

Alternatively, for a version that is not yet updated and hence available in the [krew index](https://index.krew.dev/), you can install `fleet` from this repo as follows:

```sh
$ git clone https://github.com/mhausenblas/kcf.git && cd kcf

$ kubectl krew install --manifest=deploy/krew/fleet.yaml
```

If the installation fails, check if `krew` is available on your local system
and also, make sure you're using the most recent index (run `kubectl krew update`) to ensure this.

Expand All @@ -35,9 +27,13 @@ To get an overview of your entire fleet, do:

```sh
$ kubectl fleet
CLUSTER VERSION NODES NAMESPACES API
mngbase.us-west-2.eksctl.io v1.14.8-eks-41be3d 2 5 https://123456789ABCDEF.gr7.us-west-2.eks.amazonaws.com
kind-mh9local v1.16.3 1 4 https://127.0.0.1:58836
CLUSTER VERSION NODES NAMESPACES PROVIDER API
kind-kind-3 v1.16.3 1/1 4 kind https://127.0.0.1:32769
test-cluster-2 v1.16.2 1/1 4 minikube https://192.168.64.4:8443
kind-test2 v1.16.3 1/1 4 kind https://127.0.0.1:32768
minikube v1.16.2 1/1 4 minikube https://192.168.64.3:8443
gke_krew-release-bot-260708_us-central1-a_standard-cluster-1 v1.15.8-gke.3 3/3 4 GKE https://104.197.42.183
do-sfo2-k8s-1-16-6-do-0-sfo2-1581265844177 v1.16.6 3/3 4 Digital Ocean https://f048f314-4f77-47c2-9264-764da91d35e0.k8s.ondigitalocean.com
```

### Exploring clusters in the fleet
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/mhausenblas/kcf
module github.com/kubectl-plus/kcf

go 1.12

Expand Down
2 changes: 1 addition & 1 deletion pkg/fleet/overview.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func getProvider(cfg api.Config, contextName string) string {
switch {
case strings.HasPrefix(contextName, "kind-"):
return "kind"
case strings.HasPrefix(apiServerEndpoint, "gke"):
case strings.HasPrefix(contextName, "gke"):
return "GKE"
case strings.Contains(apiServerEndpoint, "amazon"):
return "AWS"
Expand Down

0 comments on commit 431d866

Please sign in to comment.