NETOBSERV-1554 Add CLI to Krew index#27
NETOBSERV-1554 Add CLI to Krew index#27openshift-merge-bot[bot] merged 6 commits intonetobserv:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #27 +/- ##
==========================================
+ Coverage 0.00% 31.25% +31.25%
==========================================
Files 5 5
Lines 898 944 +46
==========================================
+ Hits 0 295 +295
+ Misses 898 629 -269
- Partials 0 20 +20
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
commands/netobserv
Outdated
| echo " version Print software version." | ||
| echo | ||
| exit 0 | ||
| elif [ "$1" = "version" ]; then |
There was a problem hiding this comment.
pls change this to
case "$1" in
"version")
echo "Netobserv CLI version $version"
exit 0 ;;
"flows")
;;
"packets")
;;
"cleanup")
;;
esacThere was a problem hiding this comment.
I'll give a try ! Thanks for the tips !
Makefile
Outdated
| tar-commands: clean ## Generate tar.gz containing krew plugin | ||
| $(MAKE) KREW_PLUGIN=true kubectl-commands | ||
| tar -czf netobserv-cli.tar.gz LICENSE ./build/netobserv | ||
| sha256sum netobserv-cli.tar.gz |
There was a problem hiding this comment.
not clear to me how the above tar ball will include krew plugin ?
There was a problem hiding this comment.
This is just creating a tarball and showing sha256 for now.
After that we need to publish the tar.gz to a release (in github for upstream) where a downloadable link is available
Finally we need to publish a krew index containing the link + sha in https://github.com/kubernetes-sigs/krew-index
There was a problem hiding this comment.
added a script to generate index according to version ad143ad
| tar -czf netobserv-cli.tar.gz LICENSE ./build/netobserv | ||
| @echo "### Generating krew index yaml" | ||
| VERSION=$(VERSION) \ | ||
| ./scripts/krew.sh |
There was a problem hiding this comment.
don't we need this operation to be arch aware and generate tar ball for each arch ?
There was a problem hiding this comment.
I need to test it on different arch first. It may work out of box; else maybe just tweaking around the script.
On top, krew index allow you to point different binaries for each platform if needed
| 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 |
There was a problem hiding this comment.
do u need to add ./tmp/release.md to .gitignore
There was a problem hiding this comment.
tmp folder is already there
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Description
This is a preparatory work for krew index creation:
binentryreleasetarget to generate krew package and prepare github releasekubectlorocHere is a krew index sample:
https://gist.github.com/jpinsonneau/a34785c85a20c3899ec91f266ff33823
You can test it using:
The krew index will be automatically generated by github
releasejob and appened to body release notes as draft.Dependencies
n/a
Checklist
If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.