-
Notifications
You must be signed in to change notification settings - Fork 348
Add Implementation for WCOW process isolation support. #1264
Conversation
ca19b53
to
e41a2fd
Compare
if username != "" { | ||
specOpts = append(specOpts, oci.WithUser(username)) | ||
} | ||
// TODO(windows): Add CredentialSpec support. |
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.
microsoft/hcsshim#347 for tracking
e41a2fd
to
66711f6
Compare
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.
This is awesome!
} | ||
// TODO(windows): Add CredentialSpec support. | ||
|
||
for pKey, pValue := range getPassthroughAnnotations(sandboxConfig.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.
Can you add a TODO for ContainerAnnotations pending: #1260
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.
And I still need to talk with @jiayingz about how we should pass the annotation.
The unit test will catch this anyway, don't worry. :) One good thing about sharing the common unit test in this PR.
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.
This merged want to update?
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.
Already updated. See below.
66711f6
to
d79a8f3
Compare
OK. No images meet our requirement in either appveyor or travis. I'll build a simple framework to use GCE to run the CRI validation test. |
e261abd
to
3a57573
Compare
/test pull-cri-containerd-windows-cri |
3a57573
to
c2f4621
Compare
/test pull-cri-containerd-windows-cri |
07fad6f
to
a4ddc01
Compare
f99c407
to
de5a901
Compare
/test pull-cri-containerd-windows-cri |
de5a901
to
12943e4
Compare
/test pull-cri-containerd-windows-cri |
12943e4
to
c77f496
Compare
/test pull-cri-containerd-windows-cri |
This is awesome! |
c77f496
to
945d002
Compare
/test pull-cri-containerd-windows-cri |
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.
see questions/comments for first half of review :-)
pkg/config/config_windows.go
Outdated
return PluginConfig{} | ||
return PluginConfig{ | ||
CniConfig: CniConfig{ | ||
NetworkPluginBinDir: "C:\\Program Files\\containerd\\cni\\bin", |
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.
should probably have an install directory variable somewhere to cover the /root path of the installed files. This so people can install containerd to a different drive/folder
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.
Make sense.
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.
Changed to filepath.Join(os.Getenv("ProgramFiles"), "containerd", "cni", "bin")
.
Actually the CNI binaries and configs don't necessarily need to reside in the container install directory, the default seems reasonable enough to me. :)
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.
ok .. just a typical courtesy for 3rd party to have an option... if it gets hosted by msft that would be different. Another question for @jterry75
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.
@mikebrow The CNI directory is configurable. :) People always have an option.
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.
I mean for windows... you don't have to use ProgramFiles..
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 can address install options and root paths in some other PR after there is a decision on overall deploy of containerd.
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.
@mikebrow containerd is using ProgramData
(previously ProgramFiles
) for storing all the data https://github.com/containerd/containerd/blob/master/defaults/defaults_windows.go#L29.
As my understanding, the binaries and configurations should be in ProgramFiles
. :) @jterry75 may know more about the convention here.
OSVersion: "10.0.17762.1", | ||
}, | ||
} | ||
sort.SliceStable(platforms, func(i, j int) 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.
general question on the overall implementation... is there a statement about 32bit support? will users have to create 64bit containers with 32bit supporting 386 libraries?
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.
I think this is more a question for @jterry75 :)
/test pull-cri-containerd-windows-cri |
3ac2004
to
cc45ccd
Compare
/test pull-cri-containerd-windows-cri |
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.
LGTM
Signed-off-by: Lantao Liu <lantaol@google.com>
Signed-off-by: Lantao Liu <lantaol@google.com>
Signed-off-by: Lantao Liu <lantaol@google.com>
Signed-off-by: Lantao Liu <lantaol@google.com>
cc45ccd
to
7e96aaa
Compare
Squashed the last commit. Apply LGTM based on #1264 (review) |
/test pull-cri-containerd-windows-cri |
WAHOO!!! |
What's the proper process to build this? Can someone update the doc and clarify whether you're doing cross or native builds? |
@PatrickLang Just |
I think the doc issue mentioned should be #1285 |
For #1257.
The PR has 5 commits:
FILE_SHARE_DELETE
. This is required for log rotation to work. Kubelet should be able to rename the container log file when the file is opened by containerd. Golang 1.14 is going to support this, and then we can get rid of our own implementation. (See proposal: os: Create/Open/OpenFile() set FILE_SHARE_DELETE on windows golang/go#32088)