forked from netobserv/netobserv-cli
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathkrew.sh
More file actions
executable file
·50 lines (45 loc) · 1.47 KB
/
krew.sh
File metadata and controls
executable file
·50 lines (45 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env bash
SHA=$(sha256sum netobserv-cli.tar.gz | awk '{print $1}')
URL="<URL>"
if [[ $VERSION = v+([[:digit:]]).+([[:digit:]]).+([[:digit:]]) ]]; then
URL="https://github.com/${IMAGE_ORG}/network-observability-cli/releases/download/${VERSION}/netobserv-cli.tar.gz"
fi
indexYaml='
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: netobserv
spec:
version: "'${VERSION}'"
homepage: https://github.com/netobserv/network-observability-cli
shortDescription: "Lightweight Flow and Packet visualization tool"
description: |
Deploys NetObserv eBPF agent on your k8s cluster to collect flows
or packets from nodes network interfaces and streams data to a local
collector for analysis and visualization.
platforms:
- selector:
matchExpressions:
- key: "os"
operator: "In"
values:
- darwin
- linux
uri: "'${URL}'"
sha256: "'${SHA}'"
files:
- from: "build/netobserv"
to: "netobserv"
- from: "LICENSE"
to: "."
bin: netobserv
'
echo "Copy the following YAML and submit it to https://github.com/kubernetes-sigs/krew-index for release:"
echo "${indexYaml}"
# github todo release notes
# check .github/workflows/release.yml for usage
mkdir -p ./tmp
echo "TODO:
- Submit updated index to https://github.com/kubernetes-sigs/krew-index to update plugin:
\`\`\`yaml${indexYaml}\`\`\`
- Click on 'generate release notes' above and publish" > ./tmp/release.md