Skip to content

Conversation

@jsturtevant
Copy link
Contributor

The metrics endpoint with containerd running doesn't return stats (kubernetes/kubernetes#104286) and the dockershim component calls metrics twice (kubernetes/kubernetes#104285)

This PR enables the gathering the stats to enable the two scenarios.

@jsturtevant jsturtevant requested a review from a team as a code owner August 11, 2021 00:17
EnableLowMetric bool `json:",omitempty"`
Namespace *Namespace `json:",omitempty"`
EncapOverhead uint16 `json:",omitempty"`
SharedContainers []string `json:",omitempty"`

Choose a reason for hiding this comment

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

What is this change for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In kubelet, I need to know which containers the endpoint is associated with. I found this function:

func (endpoint *HNSEndpoint) IsAttached(vID string) (bool, error) {
that does this check so I am exposing the data here.

@dcantah
Copy link
Contributor

dcantah commented Aug 11, 2021

The two stats calls is just a dockershim problem?

@kevpar
Copy link
Member

kevpar commented Aug 11, 2021

@Keith-Mange can someone from your team please take a look?

@elweb9858
Copy link
Contributor

lgtm

@jsturtevant
Copy link
Contributor Author

The two stats calls is just a dockershim problem?

You are right it is called twice for containerd too since containerd does the call. The networkstats are not returned during this time.

@jsturtevant jsturtevant force-pushed the add-network-stats branch 2 times, most recently from 31d1d57 to aa76ca7 Compare August 11, 2021 18:38
@jsturtevant
Copy link
Contributor Author

@dcantah I've fixed up the comments

@dcantah
Copy link
Contributor

dcantah commented Aug 11, 2021

@jsturtevant Thanks! Replied/left one more comment about the exported method

@dcantah
Copy link
Contributor

dcantah commented Aug 11, 2021

@jsturtevant Oop didn't even realize also, could you sign off your commits as well. git commit --amend -s should do it.

@jsturtevant jsturtevant force-pushed the add-network-stats branch 2 times, most recently from 4c4aaed to 5b41133 Compare August 11, 2021 20:13
@dcantah
Copy link
Contributor

dcantah commented Aug 11, 2021

@katiewasnothere Let me know if you have any other questions or feedback. I'll check in eod if not (or just check it in if you approve)

Edit: Oh the CI hasn't ran yet, also depends on that then also 😆

@jsturtevant
Copy link
Contributor Author

Edit: Oh the CI hasn't ran yet, also depends on that then also 😆

It had two commits so I had to do a little more than git commit --amend -s so it required me to push again

@dcantah
Copy link
Contributor

dcantah commented Aug 11, 2021

All green, so no worries!

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.

5 participants