Revert "pkg/kubelet: Fix userns tests on Windows"

This reverts commit 74b069d0fa.

Now that pkg/kubelet/userns has a windows stub, there is no need to
handle this here. Let's remove this code so if it's ever called from
windows, we find an error and the bug surfaces immediately.

I've added it yesterday as an abundance of caution, to make sure the
tests go back to green in the master branch. But now that everything is
green again, it should be safe to remove it.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
This commit is contained in:
Rodrigo Campos 2025-03-14 16:56:48 +01:00
parent 8d71f74fcd
commit b8361f9c6e

View File

@ -131,11 +131,6 @@ func (kl *Kubelet) getKubeletMappings() (uint32, uint32, error) {
return defaultFirstID, defaultLen, nil
}
// Windows doesn't support user namespaces, let's return the default mappings.
if runtime.GOOS == "windows" {
return defaultFirstID, defaultLen, nil
}
_, err := user.Lookup(kubeletUser)
if err != nil {
var unknownUserErr user.UnknownUserError