Add support of hyperv isolation for windows containers#58751
Add support of hyperv isolation for windows containers#58751k8s-github-robot merged 2 commits intokubernetes:masterfrom
Conversation
|
/sig windows |
|
@feiskyer: GitHub didn't allow me to request PR reviews from the following users: PatrickLang, JiangtianLi. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn response to this: Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/sig node /cc @yujuhong |
There was a problem hiding this comment.
Do we need apply the isolation specific config to sandbox? For Windows Hyper-V container, the POD infra container is not used and needs to be minimal, and therefore process container is sufficient.
There was a problem hiding this comment.
It is not used now, but not future. I think we'd better keep sandbox same with containers, WDYT?
There was a problem hiding this comment.
That's fine with me. We can reserve it as place holder.
There was a problem hiding this comment.
For Hyper-V container, no need to call modifyHostNetworkOptionForContainer.
There was a problem hiding this comment.
Can we add a comment here saying "Return the first non-sandbox container IP as POD IP for Hyper-V container"?
|
/cc @madhanrm |
|
@JiangtianLi: GitHub didn't allow me to request PR reviews from the following users: madhanrm. Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Refer to const in https://github.com/moby/moby/blob/master/api/types/container/host_config.go or add a comment with link to where this string comes from?
There was a problem hiding this comment.
ack, will add a refer link
There was a problem hiding this comment.
nit: prefer
v, ok := annotations[hypervIsolationAnnotationKey]
return ok && v == hypervIsolationThere was a problem hiding this comment.
Please include experimental in the key. I want to make it clear that this is not an official API, and won't be supported long term -- eventually we will have a native secure container concept that this should move to.
There was a problem hiding this comment.
Does this mean that hyperV isolated containers will not have any networking by default?
There was a problem hiding this comment.
no, hyperV container's network will be set by CNI plugins
There was a problem hiding this comment.
As noticed here, HyperV only support one container per Pod yet. And container will receive a different IP from sandbox. So we need to get the real container's IP.
There was a problem hiding this comment.
Could you include information that in the comment?
|
@tallclair Addressed comments. PTAL |
|
@yujuhong Addressed comments and squashed. PTAL |
|
Should this be behind a feature gate? I'm on the fence... |
@tallclair I'm thinking only API changes requires feature gates, while the PR doesn't change any API. WDYT? |
|
/retest |
No, we require feature gates for changed functionality too. Besides, you are changing the API by adding the annotation (just not the "official" API). What is the status of windows support? Are there users using it in production? If the answer is yes, this should be feature gated. Otherwise, I'm OK leaving it ungated. |
Yep, there are. OK, let me add a feature gate in kubelet. |
|
@tallclair Feature gates added. PTAL |
|
/lgtm |
|
/lgtm |
|
/assign @brendandburns |
|
@brendandburns could you help to take a look? |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brendandburns, feiskyer, michmike, tallclair The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
|
/test all [submit-queue is verifying that this PR is safe to merge] |
|
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
|
@feiskyer Hi, we wanted to use this feature gate in v1.20 k8s, met the same issue in https://stackoverflow.com/questions/51634469/kubernetes-windows-hyper-v-no-network-in-pod. |
What this PR does / why we need it:
Add support of hyperv isolation for windows containers.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #58750
Special notes for your reviewer:
Only one container per pod is supported yet.
Release note: