Reputation: 9118
Is there any issue with the below query?
kube_resourcequota{resource="count/deployments.apps",type="hard",namespace="test1|test2"}
It works if I pass just one namespace.
kube_resourcequota{resource="count/deployments.apps",type="hard",namespace="test1"}
Sum also works without passing anything.
sum(kube_resourcequota{resource="count/deployments.apps",type="hard"})
Upvotes: 0
Views: 401
Reputation: 6923
The instant vector selector can be expressed as
namespace="test1"
to match label namespace
exactly equal to "test1"
<no selector on namestapce>
to match all values of namespace
namespace=~"test1|test2"
to match label namespace
with given regexYou made a mistake: you used a regex "test1[test2"
with an exact match (=
) instead of regex match (=~
).
Correct expression would be:
kube_resourcequota{resource="count/deployments.apps",type="hard",namespace=~"test1|test2"}
Upvotes: 1