-
Notifications
You must be signed in to change notification settings - Fork 39k
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
Kubelet: implement GetPods for new runtime API #30121
Kubelet: implement GetPods for new runtime API #30121
Conversation
@@ -113,7 +125,43 @@ func parseContainerName(name string) (podName, podNamespace, podUID, containerNa | |||
return parts[2], parts[3], parts[4], containerName, hash, nil | |||
} | |||
|
|||
// toRuntimeProtocol converts api.Protocol to runtimeApi.Protocol | |||
// isSandBoxManagedByKubelet returns true is the sandbox is managed by kubelet. | |||
func isSandBoxManagedByKubelet(name string) bool { |
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.
nit: s/SandBox/Sandbox
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.
done.
24aa9aa
to
868b865
Compare
@yujuhong @Random-Liu Rebased since #30049 is in. PTAL. |
milliCPUToCPU = 1000 | ||
|
||
// 100000 is equivalent to 100ms | ||
quotaPeriod = 100000 |
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.
quotaPeriod = minQuotaPeriod * 100
is more readable
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.
Thanks. Fixed.
pkg/kubelet/kuberuntime/helpers.go, line 126 [r2] (raw file):
|
Reviewed 1 of 5 files at r1, 1 of 4 files at r2, 6 of 6 files at r3. pkg/kubelet/kuberuntime/kuberuntime_container.go, line 208 [r2] (raw file):
|
Looks good overall with some nits. Comments from Reviewable |
7d756d0
to
79088ba
Compare
@yujuhong Addressed comments and squashed. PTAL. |
pkg/kubelet/kuberuntime/kuberuntime_container.go, line 195 [r4] (raw file):
Suggestion: create two functions I think that's cleaner than use a boolean to toggle the behavior :) Comments from Reviewable |
79088ba
to
dc347dd
Compare
@yujuhong Thanks for good idea. PTAL. |
pkg/kubelet/kuberuntime/kuberuntime_container.go, line 195 [r4] (raw file):
|
dc347dd
to
c82ab40
Compare
pkg/kubelet/kuberuntime/kuberuntime_container.go, line 195 [r4] (raw file):
|
Looks good to me. @yifan-gu or @tmrts , do you still have more comments? Comments from Reviewable |
c82ab40
to
0173221
Compare
+lgtm Comments from Reviewable |
0173221
to
e3e10dd
Compare
Rebased. |
GCE e2e build/test passed for commit e3e10dd. |
Automatic merge from submit-queue |
belated LGTM :) |
Implement GetPods for kuberuntime. Part of #28789 .
CC @yujuhong @Random-Liu
This change is