Skip to content

Commit

Permalink
First krew plugin version
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandorubbo committed Jan 2, 2020
1 parent 48d060c commit ffea16a
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 20 deletions.
Binary file modified bin/kubectl-snapshot-darwin-386
Binary file not shown.
Binary file modified bin/kubectl-snapshot-darwin-amd64
Binary file not shown.
Binary file modified bin/kubectl-snapshot-linux-386
Binary file not shown.
Binary file modified bin/kubectl-snapshot-linux-amd64
Binary file not shown.
Binary file modified bin/kubectl-snapshot-windows-386.exe
Binary file not shown.
Binary file modified bin/kubectl-snapshot-windows-amd64.exe
Binary file not shown.
10 changes: 7 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@ cp bin/* ~/repos/github/fbrubbo/kubectl-snapshot/bin
# 1. ./install.sh
# 2. git push
# 4. create new release in github
# 5. replace all 'uri' and 'sha256' entries in snapshot.yaml
# 6. git push (just to have the new uri and sha256 saved)
# 5. get the sha256 hash using https://emn178.github.io/online-tools/sha256_checksum.html
# 6. replace all 'uri' and 'sha256' entries in snapshot.yaml
# 7. kubectl krew install --manifest=snapshot.yaml
# 8. kubectl snapshot -v
# 8. submite a pull request to https://github.com/kubernetes-sigs/krew-index
# 9. git push (just to have the new uri and sha256 saved)


# TO DEPLOY ON KREW
# 1. submite a pull request to https://github.com/kubernetes-sigs/krew-index using snapshot.yaml content


4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"time"
)

const version = "0.1.0"
const versionDesciption = "Initial Version"
const version = "0.1.2"
const versionDesciption = "First krew plugin version"

// TODO: sort-by ? How to handle the below scenarios?
func main() {
Expand Down
37 changes: 22 additions & 15 deletions snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ kind: Plugin
metadata:
name: snapshot
spec:
version: "v0.1.1"
version: "v0.1.2"
platforms:

- selector:
matchLabels:
os: linux
arch: amd64
uri: https://github.com/fbrubbo/kubectl-snapshot/archive/v0.1.0.tar.gz
sha256: "369e4bbbe1afa76d5f363f7c123235ac556bd12989bc3fca286982f338086610"
uri: https://github.com/fbrubbo/kubectl-snapshot/archive/v0.1.2.tar.gz
sha256: "df1e293d28130d5a02f9f057fca84f7f3abc2d39e01ff4883d54284aca9c9aab"
files:
- from: "kubectl-snapshot-*/bin/kubectl-snapshot-linux-amd64"
to: "."
Expand All @@ -22,8 +22,8 @@ spec:
matchLabels:
os: linux
arch: 386
uri: https://github.com/fbrubbo/kubectl-snapshot/archive/v0.1.0.tar.gz
sha256: "369e4bbbe1afa76d5f363f7c123235ac556bd12989bc3fca286982f338086610"
uri: https://github.com/fbrubbo/kubectl-snapshot/archive/v0.1.2.tar.gz
sha256: "df1e293d28130d5a02f9f057fca84f7f3abc2d39e01ff4883d54284aca9c9aab"
files:
- from: "kubectl-snapshot-*/bin/kubectl-snapshot-linux-386"
to: "."
Expand All @@ -35,8 +35,8 @@ spec:
matchLabels:
os: darwin
arch: amd64
uri: https://github.com/fbrubbo/kubectl-snapshot/archive/v0.1.0.tar.gz
sha256: "369e4bbbe1afa76d5f363f7c123235ac556bd12989bc3fca286982f338086610"
uri: https://github.com/fbrubbo/kubectl-snapshot/archive/v0.1.2.tar.gz
sha256: "df1e293d28130d5a02f9f057fca84f7f3abc2d39e01ff4883d54284aca9c9aab"
files:
- from: "kubectl-snapshot-*/bin/kubectl-snapshot-darwin-amd64"
to: "."
Expand All @@ -47,8 +47,8 @@ spec:
matchLabels:
os: darwin
arch: 386
uri: https://github.com/fbrubbo/kubectl-snapshot/archive/v0.1.0.tar.gz
sha256: "369e4bbbe1afa76d5f363f7c123235ac556bd12989bc3fca286982f338086610"
uri: https://github.com/fbrubbo/kubectl-snapshot/archive/v0.1.2.tar.gz
sha256: "df1e293d28130d5a02f9f057fca84f7f3abc2d39e01ff4883d54284aca9c9aab"
files:
- from: "kubectl-snapshot-*/bin/kubectl-snapshot-darwin-386"
to: "."
Expand All @@ -60,8 +60,8 @@ spec:
matchLabels:
os: windows
arch: amd64
uri: https://github.com/fbrubbo/kubectl-snapshot/archive/v0.1.0.tar.gz
sha256: "369e4bbbe1afa76d5f363f7c123235ac556bd12989bc3fca286982f338086610"
uri: https://github.com/fbrubbo/kubectl-snapshot/archive/v0.1.2.tar.gz
sha256: "df1e293d28130d5a02f9f057fca84f7f3abc2d39e01ff4883d54284aca9c9aab"
files:
- from: "kubectl-snapshot-*/bin/kubectl-snapshot-windows-amd64.exe"
to: "."
Expand All @@ -72,8 +72,8 @@ spec:
matchLabels:
os: windows
arch: 386
uri: https://github.com/fbrubbo/kubectl-snapshot/archive/v0.1.0.tar.gz
sha256: "369e4bbbe1afa76d5f363f7c123235ac556bd12989bc3fca286982f338086610"
uri: https://github.com/fbrubbo/kubectl-snapshot/archive/v0.1.2.tar.gz
sha256: "df1e293d28130d5a02f9f057fca84f7f3abc2d39e01ff4883d54284aca9c9aab"
files:
- from: "kubectl-snapshot-*/bin/kubectl-snapshot-windows-386.exe"
to: "."
Expand All @@ -97,6 +97,13 @@ spec:
Other fine tunning are allowed, to understand more type:
kubectl snapshot -h
caveats: |
Find more details in the documentation:
https://github.com/fbrubbo/kubectl-snapshot
In order to do more advaced analysis, we strongly suggested you to save
the output in csv files, using the command below, and importing them in
a spreadsheet.
kubectl snapshot -csv-output <NAME>
See an suggestion on how to interpret the data in
https://github.com/fbrubbo/kubectl-snapshot/blob/master/README.md#sugestions-on-how-to-interpret-the-data

0 comments on commit ffea16a

Please sign in to comment.