-
Notifications
You must be signed in to change notification settings - Fork 364
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
[MON-1695] expose /api/v1/labels end point for Thanos query. #1299
[MON-1695] expose /api/v1/labels end point for Thanos query. #1299
Conversation
f1d13bc
to
7ebeecb
Compare
7ebeecb
to
2277097
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/hold do we want to wait for the kube-rbac-proxy change before testing/merging? |
2277097
to
2f7ebd9
Compare
yes, let's hold it before modifying kube-rbac-proxy. |
This PR is created for allowing trailing wildcard in kube-rbac-proxy --allow-paths . |
/retest |
2f7ebd9
to
f6cdefc
Compare
/retest |
now we are waiting for a new release from kube-rbac-proxy that includes This PR |
f6cdefc
to
213f9f9
Compare
213f9f9
to
86cd670
Compare
jsonnet/thanos-querier.libsonnet
Outdated
@@ -493,6 +493,7 @@ function(params) | |||
'--insecure-listen-address=127.0.0.1:9095', | |||
'--upstream=http://127.0.0.1:9090', | |||
'--label=namespace', | |||
'-enable-label-apis', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'-enable-label-apis', | |
'--enable-label-apis', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated, thanks 👍
136aa84
to
84cd17b
Compare
|
/retest-required |
t.Fatal(err) | ||
} | ||
|
||
// Grant enough permissions to read labels. todo: check if need create new role |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The labels endpoints are similar to the query endpoints: if you are authorized for /api/v1/query, you should also be for /api/v1/labels.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification. The test for labels will use the same role as that for query.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you remove the todo: ...
part (or address it)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup. already checked: no need for another account
|
||
t.Logf("Checking all labels") | ||
|
||
// check /api/v1/labels end point |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// check /api/v1/labels end point | |
// check /api/v1/labels endpoint. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still need fixing :)
} | ||
|
||
// check /api/v1/label/<label>/value using some examples | ||
for _, label := range []string{"endpoint", "event", "node"} { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would check that the namespace
label returns only 1 item (e.g. userWorkloadTestNs
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I will modify the test accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test has been updated to include the namespace label.
can get /api/v1/labels and /api/v1/label/$({label_name}/values for user project, example
/label qe-approved |
b4c69b4
to
e57442e
Compare
/retest-required |
/label docs-approved |
t.Fatalf("failed to query labels from Thanos querier: %v", err) | ||
} | ||
|
||
// check /api/v1/label/<label>/value using some examples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that checking /api/v1/label/namespace/values
is enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests for other labels have been removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/hold
still some comments to be addressed.
e57442e
to
14bf8bc
Compare
E2E test has been updated according to comments. |
@raptorsun: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/retest-required |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jan--f, PhilipGough, raptorsun, simonpasquier The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/unhold |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/label px-approved |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
Expose /api/v1/labels end point for Thanos query.
End point for /api/v1/label//values is added but not working yet, need to update kube-rbac-proxy to support at least trailing wildcard patterns.
This PR requires the 2 PRs below done before merge, and they are merged now: