karpor icon indicating copy to clipboard operation
karpor copied to clipboard

unable to search for pods by label containing dash

Open iamryanchia opened this issue 1 year ago • 1 comments

What would you like to be added?

The pod labels can contain dashes, as described in syntax-and-character-set. However, searching for pods with label containing a dash will result in an error.

2024-08-06 17 58 29

Why is this needed?

unable to search for pods by valid label

iamryanchia avatar Aug 06 '24 10:08 iamryanchia

@iamryanchia Got it, let's take a look

elliotxx avatar Aug 06 '24 10:08 elliotxx

Hi, I want to try to solve this problem, but I found that the above query writing method may not be correct. The value in string format must be enclosed in single or double quotation marks, otherwise it will be parsed as a column name by SQL parser. If the above label value is enclosed in single or double quotation marks, this problem will be solved.

The test results as below:

  • invalid query image

  • single quotation image

  • double quotation image

gshilei avatar Nov 24 '24 11:11 gshilei

@gshilei Thank you for trying to reproduce this issue! It doesn't seem to be a bug, so let's close this issue.

ruquanzhao avatar Nov 25 '24 06:11 ruquanzhao