-
Notifications
You must be signed in to change notification settings - Fork 38.9k
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
Add a docker-shim package #29553
Add a docker-shim package #29553
Conversation
for k, v := range config.GetAnnotations() { | ||
if _, ok := labels[k]; !ok { | ||
// Only write to labels if the key doesn't exist. | ||
labels[k] = v |
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.
In this way, it is impossible to get annotations back. Maybe save all annotations inside one label, e.g. io.kubernetes.container.annotations
?
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.
Yes, I have a TODO for that.
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.
Use a prefix to distinguish labels and annotations. Or else when get container status how do we know which is label, which is annotation? :)
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.
Added a TODO for that.
This looks interesting, but it's unclear what's the motivation for this exactly, is there a meta issue in features repo or anything like that? |
Addressed comments and fixed the boilerplate issue. PTAL. Thanks! |
@errordeveloper, we are migrating all the runtime integration to the new interface. kubernetes/enhancements#54 |
} | ||
|
||
if filter.LabelSelector != nil { | ||
for k, v := range filter.LabelSelector { |
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.
We should add ("label", "k=v") here.
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.
You're right. I saw the documentation but forgot to correct it. Done.
I need to find a good way to test this code.
return | ||
} | ||
|
||
func generateMountBindings(mounts []*runtimeApi.Mount) (result []string) { |
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.
Port original comment here.
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.
LGTM with nits. |
ce2e190
to
66e0fb5
Compare
// ImageManagerService interface defines the interfaces that should be implemented | ||
// by a container image manager. | ||
// Thread safety is required from implementations of this interface. | ||
// ImageManagerService interface should be implemented a container image |
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.
s/implemented/implemented by
Add a new docker integration with kubelet using the new runtime API. This change adds the package with some skeletons, and implements some of the basic operations.
LGTM. @dchen1107 Do you want to take another look? |
LGTM. We can make |
@yujuhong thank you for the pointer to feature issue. I am also really quite curious about the benefits of |
Applied lgtm based on the reviews to unblock other PRs. |
@errordeveloper I think there is some misunderstanding -- the shim is to make docker client library conform to the new interface kubelet uses. The docker shim in this PR still calls docker daemon to perform operations. |
LGTM |
Thanks for the rubberstamp :) |
GCE e2e build/test passed for commit 03d11bc. |
Automatic merge from submit-queue |
@yujuhong ah, so I have just checked and what I was thinking of is |
Automatic merge from submit-queue dockershim: Implement more functions. Based on #29553. Only the last two commits are new.
Add a new docker integration with kubelet using the new runtime API.
This change adds the package with the skeleton and implements some of the basic operations.
This PR only implements a small sets of functions. The rest of the functions will be implemented
in the followup PRs to keep the changes readable, and the reviewers sane.
Note: The first commit is from #28396, only the second commit is for review.
/cc @kubernetes/sig-node @feiskyer @Random-Liu