operator icon indicating copy to clipboard operation
operator copied to clipboard

api/vmrule: populate validation error in VMRule status

Open iceman2077 opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe

When a user creates a VMRule and it is not the correct one, the user does not see the error. I want the operator to write this error/status in the crd VMRule status in case of an error, and the user, when describing a resource, could see that there is an error there. Not all users have access to go and look at vmalert logs since this is a system component, and VMRule is just a user resourceю.

Describe the solution you'd like

I want the operator to write this error in the crd VMRule status in case of an error, and the user, when describing a resource, could see that there is an error there.

Describe alternatives you've considered

No response

Additional information

No response

iceman2077 avatar Jan 29 '24 23:01 iceman2077

Hello! You can enable validation admission webhook for VMRules, in this way, user will be refused immediately when trying apply invalid resource. And we will improve this validation in https://github.com/VictoriaMetrics/operator/issues/820. And since there is validation admission webhook, operator won't do duplicated check for vmrule spec, thus it can't write validation error back to vmrule.status.

And this issue is about operator, I will transfer it to the operator repo)

Haleygo avatar Jan 30 '24 03:01 Haleygo