expressions and labels #13121
-
I don't know how this is supposed to be used. Kubernetes labels usually have the format An then there are the workflow variables They don't seem to mix very well. How on earth is this supposed to be used to end up with a valid expression? The closest I got to work was this: - when: "{{ workflow.labels.x/y }} == 'value'" And this only works when that label exists. If it doesn't exist (which in my case can happen):
or
I also tried these:
So, how do I build a condition using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
You're missing an equals sign -- try No equals sign in
This one is pretty confusing, detailed in #11549 (comment). Basically Workflows often replaces the full, primitive variable and there are no data structures with "nested variables" -- i.e. I'm not sure if |
Beta Was this translation helpful? Give feedback.
IMO, I would just report both and then do subtraction in your metrics queries if you really need to. That would be substantially less hacky and would make sense for metrics; they're all counters and some overlap