-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Report downwardAPI volumes are not allowed to be used in a shared cluster #2307
Comments
Enforcing security policies and reporting conflicts seems like it should remain K8s' responsibility, and Tekton shouldn't get involved. The author of a Task that depends on a downwardAPI volume should make it clear to users that this might not always be available on a particular cluster, either due to PSP, or other limitations of the cluster in question (e.g., other exotic volume types are only supported on certain cloud providers, for example). |
I think this particular |
yes, from internal task step / container :) |
Just to help clarify,
I originally thought we would be removing the use of the downwardAPI in #2158 but this is not the case. Instead we are changing when the sidecar readiness annotation will appear. The downward API is still used to project that annotation into step containers. Unfortunately I do not think we support this use case - a cluster must support downwardAPI volumes for Tekton to work. So, I'm going to mark this issue as a feature request. |
Oh whoops! 😓 In that case, we should document that Tekton currently requires access to the Downward API for volumes. Longer term, if this is serious issue, we have ideas for better signaling (#1570) that might allow us to remove the downward dependency. |
Hmm... very nasty. FWIW we allow use of downward api in our multi-tenant cluster however each tenant workload is restricted to a single namespace so we can get away with a slightly less restrictive policy here. |
I guess the real question here is why the I'm going to add a bug label based on that and remove the feature label. This seems like something that should work when a pod security policy is in place and correct. /kind bug |
It looks like we have our own PodSecurityPolicy which does not list I'm not 100% sure on how this works but am wondering if this might be the reason that the error is happening despite the PodSecurityPolicy mentioned in the issue description? @zhangtbj could you try updating the |
I'm going to close this issue for now but @zhangtbj please reopen if you are still having trouble! |
I've raised #4937 because I have an entirely separate scenario where |
Hi all,
I am using Tekton with (buildpacks) to build my source code to the container image.
But I didn't run the Tekton task on my own cluster, it is a shared cluster with some security policy.
It works fine on my own cluster, but in this shared cluster, it reported an error:
Warning BuildCreationFailed 55m taskrun-controller Failed to create build pod "buildpack-nodejs-b95mx": pods "buildpack-nodejs-b95mx-pod-8gh7s" is forbidden: unable to validate against any pod security policy: [spec.volumes[5]: Invalid value: "downwardAPI": downwardAPI volumes are not allowed to be used spec.volumes[5]: Invalid value: "downwardAPI": downwardAPI volumes are not allowed to be used]
And I heard from Slack channel that Tekton plan to the downwardAPI can be configurable. Is that done now?
And I confirmed with cluster admin. We had the PSP like this:
But still fail.
I just want to build a container image, is there any way to workaround this problem or disable the downwardAPI during the build in Tekton?
Thanks a lot
The text was updated successfully, but these errors were encountered: