sensu / sensu-go

Simple. Scalable. Multi-cloud monitoring.
https://sensu.io
MIT License
1.02k stars 176 forks source link

Unable to add sensuctl command from Bonsai #3421

Closed treydock closed 4 years ago

treydock commented 4 years ago

Expected Behavior

I'd expect examples from Sensu Go documentation to work when adding sensuctl command install using bonsai asset

Current Behavior

[root@sensu-backend ~]# sensuctl command install sensu-email-handler sensu/sensu-email-handler:0.2.0
fetching bonsai asset: sensu/sensu-email-handler:0.2.0
Error: one or more asset builds are required

Context

I am attempting to automate the management of sensuctl command and unable to add a command from Bonsai.

CC @ghoneycutt

Your Environment

portertech commented 4 years ago

sensuctl command install is for installing sensuctl command plugin assets, you wouldn't use it for sensu/sensu-email-handler:0.2.0. There is logic to prevent users from installing non command plugin assets (using labels), however, it seems this error was encountered before that.

treydock commented 4 years ago

I was just going by what was in Sensu Go docs, so maybe this is a documentation issue also?

https://docs.sensu.io/sensu-go/5.15/sensuctl/reference/#extend-sensuctl-with-commands

treydock commented 4 years ago

@portertech I am testing CI builds after I saw #3429 get merged and now I get this:

[root@sensu-backend ~]# sensuctl command install sensu-email-handler sensu/sensu-email-handler:0.2.0
fetching bonsai asset: sensu/sensu-email-handler:0.2.0
Error: namespace cannot be empty

Passing --namespace has no effect.

If this Bonsai asset is the wrong one to use then is there one I can test with?

portertech commented 4 years ago

@amdprophet can you please provide @treydock with a working asset for testing?

amdprophet commented 4 years ago

@treydock there aren't currently any sensuctl command assets available on Bonsai that I'm aware of. You can try testing the test asset I created using the --url installation method with the url & checksum from the build listed in https://gist.github.com/amdprophet/43790e007e949aed19131b100e1576af.

treydock commented 4 years ago

Thanks, that test case worked for me.