Hi!
My use case is to keep targets (kubernetes sd) only if the values of two specific lables are equal. Can this be done ?
My Idea was to concatenate lables and do a regex lookahead comparison. The problem is that, unfortunately, lookahead is not supported by go's RE2.
Here is what I tried:
# Only keep pods if container port matches tcp-port annotation
- source_labels:
- __meta_kubernetes_pod_container_port_number
- __meta_kubernetes_pod_annotation_tcp_port
action: keep
regex: ([^;]+);(?=\1$)
Is there any other way around ?