-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chained if
conditions for relabeling not supported in vmagent CRD
#730
Comments
@towolf Thank you for the report! |
The docs seem to be here, but in the Operator this is not supported, seemingly: |
Released at v0.37.0 |
Hi @Amper it's really cool, that you already tackled this, thank you very much! When working with the CRDs we noticed that the same problem holds for Is this covered by your fix or should I open another issue for this? |
@towolf, yes, you should open another issue for that. |
Describe the bug
In the code for
IfExpression
it states that two modes are supported, a single string matcher and a chained mode with an array of conditions which are combined with OR:https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/lib/promrelabel/if_expression.go#L13-L23
However the CRD for vmagent does not support this:
We would like to use a chained config to avoid a gnarly regex matcher, like this:
This means, the single
if
contains two matchers in an array which should be combined with OR.To Reproduce
Add a relabel config like this to the vmagent CR:
Version
image: docker.io/victoriametrics/vmagent:v1.93.0
Logs
Error: cannot patch "vmstack" with kind VMAgent: VMAgent.operator.victoriametrics.com "vmstack" is invalid: [spec.remoteWrite[1].inlineUrlRelabelConfig[0].if: Invalid value: "array": spec.remoteWrite[1].inlineUrlRelabelConfig[0].if in body must be of type string: "array", spec.remoteWrite[1].inlineUrlRelabelConfig[1].if: Invalid value: "array": spec.remoteWrite[1].inlineUrlRelabelConfig[1].if in body must be of type string: "array"]
Screenshots
No response
Used command-line flags
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: