-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
Update to latest cAdvisor version and add a client package for cAdvisor #448
Conversation
Just talked with @lavalamp offline, he suggested me to use cAdvisor's data structure directly. I think this would be good for me because there'll be less work. Thoughts? ping @brendanburns @thockin @dchen1107 @vmarmol |
This PR is ready to be reviewed now. ping @brendanburns @thockin @lavalamp |
} | ||
|
||
// GetContainerStats returns stats (from Cadvisor) for a container. | ||
func (kl *Kubelet) GetContainerStats(podID, containerName string) (*api.ContainerStats, error) { | ||
func (kl *Kubelet) GetContainerStats(podID, containerName string, req *info.ContainerInfoRequest) (*info.ContainerInfo, error) { |
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.
Maybe we should rename it to GetContainerInfo()
instead?
Rebased. |
Just updated cAdvisor with most recent changes. The PR is ready for review now. Ping @lavalamp @thockin @brendandburns Thanks! |
Add another comment to retrieve machine spec from cAdvisor. We may need to consider to rename some functions. |
This is a really big and hard to review PR. Can we split it up some? |
Sure. I'm going to split it into three parts:
|
This PR is split into several PRs. All of them are merged. Close this PR. |
Move network graphs above filesystem info for root.
Change order of deleting resource from anchnet
Change order of deleting resource from anchnet
Change order of deleting resource from anchnet
Change order of deleting resource from anchnet
add a tested breakfast configuration demo
UPSTREAM: revert: <drop>: don't use dynamic tokens for KCM
This PR updates kubelet's code to use the most recent cAdvisor's API.
The current problem I encountered here is where should I put the data structures' definition.
There are several data structures' in cAdvisor describing CPU/Memory stats/specs. To retrieve stats from cAdvisor through kubelet, we could either use cAdvisor's data structures, or redefine (almost) the same structures in k8s' api package.
If we reuse cAdvisor's data structure, then there will be less copy&paste work. However, we will force kubelet users (i.e. the master) to import one of cAdvisor's package (
github.com/google/cadvisor/info
).If we redefine all, or some data structures in api, then there'll be lots of boilerplate copied from cadvisor.
Currently, I'm using the second approach (copy all data structures in the api package.) But I'm open to change. So please feel free to add any comment here.