Skip to content

Commit 05a892a

Browse files
authored
Merge pull request #49 from n2h9/chore-update-local-meshsync-snapshot
chore: update maniefst file, add local instal, update readme
2 parents c104362 + fb30d19 commit 05a892a

File tree

7 files changed

+103
-12
lines changed

7 files changed

+103
-12
lines changed

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,11 @@
1515
build:
1616
./scripts/build.sh
1717

18-
install:
19-
./scripts/install.sh
18+
uninstall:
19+
./scripts/uninstall.sh || true
20+
21+
install: uninstall
22+
./scripts/install.sh
23+
24+
install-local: uninstall
25+
./scripts/install-local.sh

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,25 @@ A self-service engineering platform, <a href="https://meshery.io">Meshery</a>, i
6262

6363
A `kubectl` plugin for performing an ad hoc collection of resource information from a Kubernetes cluster and sending the cluster resources details to a Meshery Server. `kubectl meshsync snapshot` is a native kubectl plugin for conveniently synchronizing the state of your cluster with Meshery Server.
6464

65-
# Instruction
65+
# Install from release
66+
```sh
67+
make install
68+
```
69+
70+
# Install from local
6671
1) Build
6772
```sh
6873
make build
6974
```
7075

7176
2) Update sha256
7277
Hash is produced by step 1)
73-
manually update in meshsync-snapshot.yaml
78+
manually update in meshsync-snapshot-local.yaml
79+
replace <put your hash here> with hash generated by build command (step 1)
7480

7581
3) Install
7682
```sh
77-
make install
83+
make install-local
7884
```
7985

8086
## About Meshery Extensions

meshsync-snapshot-local.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
apiVersion: krew.googlecontainertools.github.com/v1alpha2
2+
kind: Plugin
3+
metadata:
4+
name: meshsync-snapshot
5+
spec:
6+
version: v0.0.4
7+
homepage: https://github.com/meshery-extensions/kubectl-meshsync-snapshot
8+
shortDescription: Creates a k8s cluster snapshot
9+
description: |
10+
This plugin: generate a snapshot of a cluster resources as a yaml file;
11+
caveats:
12+
platforms:
13+
- selector:
14+
matchLabels:
15+
os: linux
16+
arch: amd64
17+
uri: not needed for local
18+
sha256: <put your hash here>
19+
bin: bin/meshsync-snapshot
20+
- selector:
21+
matchLabels:
22+
os: linux
23+
arch: arm64
24+
uri: not needed for local
25+
sha256: <put your hash here>
26+
bin: bin/meshsync-snapshot
27+
- selector:
28+
matchLabels:
29+
os: darwin
30+
arch: amd64
31+
uri: not needed for local
32+
sha256: <put your hash here>
33+
bin: bin/meshsync-snapshot
34+
- selector:
35+
matchLabels:
36+
os: darwin
37+
arch: arm64
38+
uri: not needed for local
39+
sha256: <put your hash here>
40+
bin: bin/meshsync-snapshot

meshsync-snapshot.yaml

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,52 @@ kind: Plugin
33
metadata:
44
name: meshsync-snapshot
55
spec:
6-
version: v0.0.1
6+
version: v0.0.4
77
homepage: https://github.com/meshery-extensions/kubectl-meshsync-snapshot
88
shortDescription: Creates a k8s cluster snapshot
99
description: |
1010
This plugin: generate a snapshot of a cluster resources as a yaml file;
1111
caveats:
1212
platforms:
13-
# TODO other platforms
1413
- selector:
1514
matchLabels:
1615
os: linux
1716
arch: amd64
18-
uri: TODO
19-
sha256: <put a hash from make build step here>
20-
bin: bin/meshsync-snapshot
17+
uri: https://github.com/meshery-extensions/kubectl-meshsync-snapshot/releases/download/v0.0.4/kubectl-meshsync-snapshot_0.0.4_Linux_x86_64.tar.gz
18+
sha256: de2f65b4ee06521b85f966bf8729000d6ccd00eb340d5f7c2812685096447496
19+
bin: kubectl-meshsync-snapshot
20+
- selector:
21+
matchLabels:
22+
os: linux
23+
arch: arm64
24+
uri: https://github.com/meshery-extensions/kubectl-meshsync-snapshot/releases/download/v0.0.4/kubectl-meshsync-snapshot_0.0.4_Linux_arm64.tar.gz
25+
sha256: 7318f1440b4d7bec447b7e2417721753669b73462e512fab4ed317cf36cc22f8
26+
bin: kubectl-meshsync-snapshot
27+
- selector:
28+
matchLabels:
29+
os: darwin
30+
arch: amd64
31+
uri: https://github.com/meshery-extensions/kubectl-meshsync-snapshot/releases/download/v0.0.4/kubectl-meshsync-snapshot_0.0.4_Darwin_x86_64.tar.gz
32+
sha256: dadc3c7402dd6a21b6a8cac5900b33ffabdf4f4884be0dfff2f5bdef4eb7ee5a
33+
bin: kubectl-meshsync-snapshot
34+
- selector:
35+
matchLabels:
36+
os: darwin
37+
arch: arm64
38+
uri: https://github.com/meshery-extensions/kubectl-meshsync-snapshot/releases/download/v0.0.4/kubectl-meshsync-snapshot_0.0.4_Darwin_arm64.tar.gz
39+
sha256: 973eeccee6358b183724a1ab9f4c08acd9877f89c7278862b0de1fe37b21adb6
40+
bin: kubectl-meshsync-snapshot
41+
- selector:
42+
matchLabels:
43+
os: windows
44+
arch: amd64
45+
uri: https://github.com/meshery-extensions/kubectl-meshsync-snapshot/releases/download/v0.0.4/kubectl-meshsync-snapshot_0.0.4_Windows_x86_64.zip
46+
sha256: 5e4b380d2f5ccde18b824f905f5480ba6c7eb4afe614001bddc0a591f44f5d32
47+
bin: kubectl-meshsync-snapshot
48+
- selector:
49+
matchLabels:
50+
os: windows
51+
arch: arm64
52+
uri: https://github.com/meshery-extensions/kubectl-meshsync-snapshot/releases/download/v0.0.4/kubectl-meshsync-snapshot_0.0.4_Windows_i386.zip
53+
sha256: 678d1959c92fe87cc074b91ef949725c5f83db7d33d593d37c094db41df24928
54+
bin: kubectl-meshsync-snapshot

scripts/install-local.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
kubectl krew install --manifest=meshsync-snapshot-local.yaml --archive=bin/v0.0.1.tar.gz

scripts/install.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
#!/bin/bash
22

3-
kubectl krew uninstall meshsync-snapshot 2>/dev/null
4-
kubectl krew install --manifest=meshsync-snapshot.yaml --archive=bin/v0.0.1.tar.gz
3+
kubectl krew install --manifest=meshsync-snapshot.yaml

scripts/uninstall.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
kubectl krew uninstall meshsync-snapshot 2>/dev/null

0 commit comments

Comments
 (0)