-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Refactored kubelet's kuberuntime_sandbox #114185
base: master
Are you sure you want to change the base?
Refactored kubelet's kuberuntime_sandbox #114185
Conversation
Please note that we're already in Test Freeze for the Fast forwards are scheduled to happen every 6 hours, whereas the most recent run was: Tue Nov 29 15:38:53 UTC 2022. |
/remove-sig node |
/retest |
2 similar comments
/retest |
/retest |
/assign @endocrimes |
/retest |
3 similar comments
/retest |
/retest |
/retest |
/assign |
/triage accepted |
@k8s-triage-robot: Closed this PR. In 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. |
/reopen |
@claudiubelu: Reopened this PR. In 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. |
/remove-lifecycle rotten |
/test pull-kubernetes-e2e-capz-windows-master |
1 similar comment
/test pull-kubernetes-e2e-capz-windows-master |
/test pull-kubernetes-e2e-capz-windows-master |
} | ||
if sc.RunAsGroup != nil && runtime.GOOS != "windows" { | ||
lc.SecurityContext.RunAsGroup = &runtimeapi.Int64Value{Value: int64(*sc.RunAsGroup)} | ||
} | ||
namespaceOptions, err := runtimeutil.NamespacesForPod(pod, m.runtimeHelper, m.runtimeClassManager) |
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.
is this one linux only? Is there something we configure for Windows for user namespaces?
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.
Took a quick glance in NamespaceForPod
: it would seem so. First of all, it does have the Network
field, which may be runtimeapi.NamespaceMode_NODE
(host network) or runtimeapi.NamespaceMode_POD
, which is relevant for Windows as well. Not sure about the other fields though (UsernsOptions
may be relevant, since it's based on the Spec
's RuntimeClassName
). I'd leave this here for the time being. But yeah, it's a bit strange that we need LinuxPodSandboxConfig
for Windows.
@@ -141,14 +140,11 @@ func (m *kubeGenericRuntimeManager) generatePodSandboxConfig(pod *v1.Pod, attemp | |||
return nil, err | |||
} | |||
podSandboxConfig.Linux = lc |
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.
do we need to set linux context on Windows node? Looks counterintuitive
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.
It seems so, according to the other comment I've left.
@@ -141,14 +140,11 @@ func (m *kubeGenericRuntimeManager) generatePodSandboxConfig(pod *v1.Pod, attemp | |||
return nil, err | |||
} |
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 have similar desire to refactor this file when I look at it. This PR is taking a very shallow step in refactoring, which makes it a matter of taste as later comment of @bart0sh indicated.
I would suggest to make a little bit bigger effort of separating clearly Windows-only, Linux-only, and shared settings. So when somebody adds a new feature they will not be confused where they put code for it
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.
dbabfc7
to
8c08682
Compare
5c0e21b
to
129626e
Compare
/test pull-kubernetes-e2e-capz-windows-master |
1 similar comment
/test pull-kubernetes-e2e-capz-windows-master |
129626e
to
cae7b6e
Compare
/test pull-kubernetes-unit |
@claudiubelu: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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-sigs/prow repository. I understand the commands that are listed here. |
Refactors platform specific code into separate files (*_linux.go / *_windows.go / *_others.go) Adds unit tests for the kuberuntime_sandbox changes. Co-Authored-By: Claudiu Belu <cbelu@cloudbasesolutions.com>
cae7b6e
to
18acb05
Compare
What type of PR is this?
/kind cleanup
/sig windows
/milestone v1.27
What this PR does / why we need it:
Refactors platform specific code into separate files (*_linux.go / *_windows.go / *_others.go)
Adds unit tests for the kuberuntime_sandbox changes.
Co-Authored-By: Claudiu Belu cbelu@cloudbasesolutions.com
Which issue(s) this PR fixes:
Partial cleanup of issue #60338
Special notes for your reviewer:
Original PR: #109761
This PR contains only the kuberuntime_sandbox changes. Contains a few additional unit tests and cleanups.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: