-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Make NET_ADMIN check a warning, add PSP check #2958
Conversation
Integration test results for 4065ab8: fail 😕 |
Integration test results for d30e90d: success 🎉 |
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.
This looks good to me 👍 🚢
With the control plane PSP, |
Another idea, as we're moving towards auto-inject being the one true way (tm), and auto-inject can return errors. What about checking to see if the attached service account has a PSP that includes This all feels like 100% a separate issue and shouldn't block the merge of this specific PR as most of my confusion seems to have stemmed from me making an invalid assumption about what the check was actually validating. |
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.
LGTM 👍
Also +1 to @grampelberg suggestion on updating the proxy injector in a separate PR to account for service account PSP + RBAC (using the can-i
API if there is one?). This PR only ensures that whoever/whatever is running linkerd check --pre
has permission to create PSP. The workload's service account will also need to have the same permission to start new pods.
`linkerd check` validates whether PSP's exist, and if the caller has the `NET_ADMIN` capability. This check was previously failing if `NET_ADMIN` was not found, even in the case where the PSP admission controller was not running. Related, `linkerd install` now includes a PSP, so `linkerd check` should also validate that the caller can create PSP's. Modify the `NET_ADMIN` check to warn, but not fail, if PSP's are found but the caller does not have `NET_ADMIN`. Update the warning message to mention that this is only a problem if the PSP admission controller is running (and will only be a problem during injection, since #2920 handles control plane installation by adding its own PSP). Also introduce a check to validate the caller can create PSP's. Fixes #2884, #2849 Signed-off-by: Andrew Seigner <[email protected]>
@grampelberg @ihcsim Thanks for the feedback re: proxy injector checking for PSP, I've filed #2968 to track. I've put the |
I'm not sure if it's necessary to check for Also, did your change leave out the CNI-enabled condition for this check? |
@ihcsim You're right that
Re: the cni check, I've left the existing behavior, where this command skips the
|
Integration test results for 19407e9: fail 😕 |
linkerd check
validates whether PSP's exist, and if the caller has theNET_ADMIN
capability. This check was previously failing ifNET_ADMIN
was not found, even in the case where the PSP admission controller was
not running. Related,
linkerd install
now includes a PSP, solinkerd check
should also validate that the caller can create PSP's.Modify the
NET_ADMIN
check to warn, but not fail, if PSP's are foundbut the caller does not have
NET_ADMIN
. Update the warning message tomention that this is only a problem if the PSP admission controller is
running (and will only be a problem during injection, since #2920
handles control plane installation by adding its own PSP).
Also introduce a check to validate the caller can create PSP's.
Fixes #2884, #2849
Signed-off-by: Andrew Seigner [email protected]