-
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
Affinity Assistant doesn't run with PipelineRun's ServiceAccount #3748
Comments
I have a PR ready to go to correct this bug. Just waiting on CLA signature from our OSS team. |
@ewolak-sq thanks for the report and the PR in preparation 😉 |
/assign @ewolak-sq |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
the pr is not merged yet. |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
@tekton-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
I am experiencing the same problem. The affinity assistant pod fails to inherit the designated service account name from the associated |
Expected Behavior
If I specify
spec.serviceAccountName
in aPipelineRun
definition, then all tasks and the affinity-assistant pod should run with the specified service account. When I run the belowPipelineRun
in our fairly locked-down Kubernetes cluster, it fails to execute because theaffinity-assistant
pod runs as the default service account, which doesn't have permissions to mountPersistentVolumeClaim
s.Actual Behavior
Affinity Assistant pod always runs as default ServiceAccount.
Additional Info
Kubernetes version:
Output of
kubectl version
:Discussion
We run Kubernetes clusters with fairly restrictive
PodSecurityPolicy
specifications to implement the principle of least-privilege. We had to create a custom PSP for Tekton Pipelines, because it needs to perform operations few other things in our clusters also need to do. We apply that PSP to a customServiceAccount
created specifically for Tekton. This works as expected forPipelineRun
andTaskRun
pods, but when we addWorkspaces
to the mix, it falls over. We dug in, and it's because theaffinityAssistantStatefulSet
doesn't copy theserviceAccountName
over from thePipelineRun
'spodTemplate
, instead falling through to the defaultServiceAccount
in theNamespace
. This behavior was rather surprising to us, and I think it's simply an oversight.The text was updated successfully, but these errors were encountered: