Skip to content
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

Fetching Node metrics directly, not assuming container metrics and pod container lists will always match up #17

Merged
merged 1 commit into from
Jun 26, 2019

Conversation

robscott
Copy link
Owner

This should fix #15 and #16.

In #15, a segmentation fault occurred. This seems to have been caused by a container being returned from the metrics API that was not returned by the pods API. I've added a nil check to cover that.

In #16, kube-capacity was showing different node totals than kubectl top. I believe that is because I had been summing pod metrics as opposed to fetching node metrics. This misses any util that might be happening outside of the scope of Kubernetes on each node. I've switched around the logic to fetch node metrics and base those numbers off of the numbers returned by the metrics API for nodes themselves.

@robscott robscott merged commit e48cbbb into master Jun 26, 2019
@robscott robscott deleted the rs/improve-node-totals branch June 26, 2019 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segmentaion fault when using -u
1 participant