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

Conversation

@igorpeshansky
Copy link
Contributor

No description provided.

@igorpeshansky igorpeshansky force-pushed the igorp-kubernetes-unscheduled-pods branch from 3205067 to 7810118 Compare March 13, 2018 13:28
}

const std::string node_name(
config_.KubernetesClusterLevelMetadata() ? "" : current_node);
Copy link
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
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
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.

}

const std::string node_name(
config_.KubernetesClusterLevelMetadata() ? "" : current_node);
Copy link
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
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.


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
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
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

LOG(INFO) << "Current node is " << current_node;
}

const std::string watched_node(
Copy link
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
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
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