-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add an introspection endpoint for container metadata #1614
Add an introspection endpoint for container metadata #1614
Conversation
df4679f
to
af350d6
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.
Looks good, and thanks for extracting the IntrospectionEndpoint common functions !
My only concern is with the underlying concurrent access via GetNamespace(). I left a comment in the other PR.
static QueryParams ParseParameters(const char* queryString); | ||
static std::optional<std::string> GetParameter(const QueryParams& params, const std::string& paramName); |
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.
These methods are not used in the PR. However, I think they will be soon, as we add more endpoints.
af350d6
to
6476c65
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.
Still looks good to me 👍
Description
Add an introspection endpoint to collector which can be used to retrieve container metadata by providing it with a container ID. At the time, the only data that is returned by the endpoint is the same container ID that was provided and the k8s namespace the container belongs to. This endpoint will enable testing of the #1606 PR without need for changes to our communication with sensor.
Checklist
Automated testing
If any of these don't apply, please comment below.
Testing Performed
Manually tested the new endpoint.