-
Notifications
You must be signed in to change notification settings - Fork 40k
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
[Kubelet] Check if kubelet is running as uid 0 #30466
Conversation
@vishh - is this a breaking change? should this be an OR check? @smarterclayton @kubernetes/rh-cluster-infra - any concerns here? |
@derekwaynecarr As for an |
AFAIK we don't have any deployments where the OpenShift node is run with a nonzero UID |
Same here, we have always required root (and I think we have a
preflight check that verifies a bunch of things that also require
root).
|
@vishh as i mentioned on IRC yesterday, Note that kubelet is started inside test-cmd.sh and hence we need to run test-cmd.sh as sudo to get past the test failure kubernetes/hack/make-rules/test-cmd.sh Line 179 in e877a23
note that the test-cmd.sh is run inside a docker container (where sudo is not available).
|
Oh, another one, Will this (check for uid==0) work for folks running "hyperkube kubectl" (#4869) or minikube(?) ? |
Can you not run as uid=0 with dropped capabilities? |
I originally had a section in this PR that validated the permitted and effective caps too. But in reality caps do not typically apply to filesystem access. Hence decided to drop it. If you feel strongly that validating caps is useful, I can add it back in. |
Signed-off-by: Vishnu kannan <vishnuk@google.com>
@derekwaynecarr @dims Integration tests seem to run kubelet not as root. I don't have cycles to fix that. For now, I'm throwing an error and reverting @dims changes! If either of you have spare cycles to clean up the integration test infra to allow kubelet to run as root, kindly post a PR. This PR will now not cause a regression! |
GCE e2e build/test passed for commit c75b61e. |
Looks good to me 👍 |
Thanks for the review! Given that this PR is non-intrusive, I'm marking it as LGTM. I'm happy to address comments in a separate PR. This should at-least fix HEAD. |
LGTM as well (logging the error, but proceeding) |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit c75b61e. |
Automatic merge from submit-queue |
Related to #30176
This change is