-
Notifications
You must be signed in to change notification settings - Fork 177
Description
Feature Suggestion
Currently, when creating a CheckConfig with a runtime_assets field, there is no validation or warning if the asset name(s) specified are missing or invalid. This can lead to runtime errors that are not immediately obvious at the time of creation.
This feature request is to add a validation step or warning mechanism during check creation to identify and notify the user if any of the referenced runtime_assets do not exist in the namespace.
Possible Implementation
-
Add backend-side validation in the check creation/update handler.
-
When processing CheckConfig.spec.runtime_assets, ensure each asset exists in the given namespace.
-
If any asset is missing:
** Option 1: Return a validation error and reject creation (like other invalid fields).
** Optionally: Add a sensuctl check lint or check validate command for dry-run validations.
Context
While building checks that depend on Bonsai assets, I realized that Sensu allows check creation with missing assets, but then fails silently (or logs a failure only at execution time). This led to extra debugging effort to trace why checks weren't executing as expected.
It would be a major usability improvement to alert users early — ideally during sensuctl create — that the asset doesn't exist.