Skip to content

Commit 69e270f

Browse files
committed
pkg/kubelet: Explain why a user is required to get userns kubelet mappings
Signed-off-by: Rodrigo Campos <[email protected]>
1 parent c984f0f commit 69e270f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/kubelet/kubelet_pods.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@ func (kl *Kubelet) getKubeletMappings() (uint32, uint32, error) {
131131
return defaultFirstID, defaultLen, nil
132132
}
133133

134+
// We NEED to check for the user because getsubids can be configured to gather the response
135+
// with a remote call and we can't distinguish between the remote endpoint not being reachable
136+
// and the remote endpoint is reachable but no entry is present for the user.
137+
// So we check for the kubelet user first, if it exist and getsubids is present, we expect
138+
// to get _some_ configuration. If the user exist and getsubids doesn't give us any
139+
// configuration, then we consider the remote down and fail to start the kubelet.
134140
_, err := user.Lookup(kubeletUser)
135141
if err != nil {
136142
var unknownUserErr user.UnknownUserError

0 commit comments

Comments
 (0)