This repository was archived by the owner on Aug 19, 2019. It is now read-only.
Add support for watching and ingesting more Kubernetes resources.#194
Merged
supriyagarg merged 5 commits intoStackdriver:v1beta3-working-branchfrom Sep 28, 2018
Merged
Conversation
The threads to watch resources other than Node and Pod are started based on the Kubernetes resource kind and API version provided in a static vector. This works for all resource types that use the generic callback.
igorpeshansky
suggested changes
Sep 17, 2018
5586df9 to
8a27362
Compare
igorpeshansky
suggested changes
Sep 20, 2018
Contributor
igorpeshansky
left a comment
There was a problem hiding this comment.
A few comments on the new code.
342950d to
948b44f
Compare
igorpeshansky
suggested changes
Sep 20, 2018
supriyagarg
commented
Sep 26, 2018
Contributor
Author
supriyagarg
left a comment
There was a problem hiding this comment.
thanks for the comments Igor - responded.
8a0971c to
1c1d9b8
Compare
igorpeshansky
suggested changes
Sep 28, 2018
Contributor
igorpeshansky
left a comment
There was a problem hiding this comment.
One remaining comment.
| for (const auto& watch_id: ClusterLevelObjectTypes()) { | ||
| const std::string& plural_kind = watch_id.first; | ||
| const std::string& api_version = watch_id.second; | ||
| object_watch_threads_.emplace( |
Contributor
There was a problem hiding this comment.
Should fit on "one line" as well:
object_watch_threads_.emplace(watch_id, std::thread([=]() {
reader_.WatchObjects(plural_kind, api_version, cb);
}));| }; | ||
| node_watch_thread_ = std::thread([=]() { | ||
| object_watch_threads_.emplace(WatchId("nodes", "v1"), std::thread([=]() { | ||
| reader_.WatchNodes(watched_node, cb); |
Contributor
There was a problem hiding this comment.
Just realized that it's probably more efficient to be capturing reader_ by reference everywhere. But we'll do that as a separate update, as it's orthogonal to this PR.
supriyagarg
added a commit
that referenced
this pull request
Sep 28, 2018
The threads to watch resources other than Node and Pod are started based on the Kubernetes resource kind and API version provided in a static vector. This works for all resource types that use the generic callback.
supriyagarg
added a commit
that referenced
this pull request
Sep 29, 2018
The threads to watch resources other than Node and Pod are started based on the Kubernetes resource kind and API version provided in a static vector. This works for all resource types that use the generic callback.
bmoyles0117
pushed a commit
that referenced
this pull request
Nov 29, 2018
The threads to watch resources other than Node and Pod are started based on the Kubernetes resource kind and API version provided in a static vector. This works for all resource types that use the generic callback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The threads to watch resources other than Node and Pod are started based on the Kubernetes resource kind and API version provided in a static vector. This works for all resource types that use the generic callback.