VictoriaMetrics / operator

Kubernetes operator for Victoria Metrics
Apache License 2.0
422 stars 140 forks source link

api/vmrule: populate validation error in VMRule status #861

Closed iceman2077 closed 3 weeks ago

iceman2077 commented 7 months ago

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

Haleygo commented 7 months ago

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)

AndrewChubatiuk commented 3 weeks ago

released in v0.47.0