Skip to content
This repository was archived by the owner on Aug 19, 2019. It is now read-only.

Add support for cluster-level queries for nodes and unscheduled pods.#73

Merged
igorpeshansky merged 7 commits intomasterfrom
igorp-kubernetes-unscheduled-pods
Mar 19, 2018
Merged

Add support for cluster-level queries for nodes and unscheduled pods.#73
igorpeshansky merged 7 commits intomasterfrom
igorp-kubernetes-unscheduled-pods

Conversation

@igorpeshansky
Copy link
Copy Markdown
Contributor

No description provided.

@igorpeshansky igorpeshansky force-pushed the igorp-kubernetes-unscheduled-pods branch from 3205067 to 7810118 Compare March 13, 2018 13:28
Comment thread src/kubernetes.cc
}

const std::string node_name(
config_.KubernetesClusterLevelMetadata() ? "" : current_node);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm concerned that the responses are very different here. When a node name is provided, a single node is returned. Is there any logic that distinguishes between a list / single node?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I forgot that in one case you get a Node and in another a NodeList. I've updated the code to be more robust.

@igorpeshansky igorpeshansky force-pushed the igorp-kubernetes-unscheduled-pods branch from 25a628c to 7810118 Compare March 13, 2018 21:04
Copy link
Copy Markdown
Contributor Author

@igorpeshansky igorpeshansky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, PTAL.

Comment thread src/kubernetes.cc
}

const std::string node_name(
config_.KubernetesClusterLevelMetadata() ? "" : current_node);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I forgot that in one case you get a Node and in another a NodeList. I've updated the code to be more robust.

Copy link
Copy Markdown
Contributor

@supriyagarg supriyagarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Comment thread src/kubernetes.cc

MetadataUpdater::ResourceMetadata KubernetesReader::GetNodeMetadata(
json::value raw_node, Timestamp collected_at, bool is_deleted) const
const json::Object* node, Timestamp collected_at, bool is_deleted) const
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a nice change!

Copy link
Copy Markdown
Contributor

@bmoyles0117 bmoyles0117 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread src/kubernetes.cc
LOG(INFO) << "Current node is " << current_node;
}

const std::string watched_node(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't have it already, can we add a very prominent log line (not based on verbose) that states that we're doing a cluster level watch, vs a node level watch?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@igorpeshansky igorpeshansky force-pushed the igorp-kubernetes-unscheduled-pods branch from fc97bfc to 61c4f0c Compare March 19, 2018 20:25
@igorpeshansky
Copy link
Copy Markdown
Contributor Author

Rebased off master.

@igorpeshansky igorpeshansky merged commit 621e16a into master Mar 19, 2018
@igorpeshansky igorpeshansky deleted the igorp-kubernetes-unscheduled-pods branch March 19, 2018 21:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants