sensu-go
sensu-go copied to clipboard
--dry-run flag for sensuctl create
Adding this here. General idea would be to have a flag that would do a dry run and lint a file that is being applied. More better info to follow
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
further activity
This issue has been mentioned on Sensu Community. There might be relevant details there:
https://discourse.sensu.io/t/sensuctl-create-dry-run-or-validate/2399/2
There's a meta feature lurking here, There needs to be a command that is the inverse of prune with the same set of controls via command flags not just --dry-run
for Ci/CD automation. Not sure if it should be create, but maybe a new command that is meant to work when paired with prune with the same operational constraints.
Here's the flag list re-interpreted for a create-like command to match prune flagged behavior
--dry-run
: reports which resources would be created/updated
--label-selector
: -> only updates/creates resources that match the label selector
--users
: -> only updates resources that match the created_by user in the list and ensures logged in user is in the list for resources to be created.
--cluster-wide
: must pass this to create/update cluster-wide resources.
--omit
: Ignore these resource types explicitly.
@asachs01 Is this issue for linting or actually doing a "dry run"? If just linting, the UI should be more specific, e.g. --lint-only --file foo.yml
. I expect a real "dry run" to indicate what resource will be created OR modified (and those that won't be), this requires fairly significant store and API work.
I think actually doing a real dry run is the real goal here @portertech