-
Notifications
You must be signed in to change notification settings - Fork 604
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
Spark on Kubernetes job fails if service account doesn't have permission to all namespaces. #461
Comments
@askhatri @jahstreet fyi |
Thank you @ashokkumarrathore for the findings. @jahstreet, please review and share your insights. |
The potential fix is to provide a namespace argument and use that in GetApplications() from Kubernetes. So, rather than looking for app in any namespace here, it should be namespaced. The namespace need to be passed from here: incubator-livy/server/src/main/scala/org/apache/livy/server/batch/BatchSession.scala Line 109 in 1f6bd7a
There are couple of options on how we do this:
@jahstreet @askhatri Please let me know your thoughts and i can implement it accordingly. |
Hi @ashokkumarrathore, |
@askhatri @jahstreet Changes for namespace support in Livy for Spark on k8s. #462 |
In a multi tenant Kubernetes cluster, it will not always be the case that livy service account has access to all namespaces. Since Livy currently looks for job in all namespaces, it fails if the permission is not there for some namespace in cluster.
Ideally we should only look for job in the namespace it was submitted to. Relevant code is here, i think :
incubator-livy/server/src/main/scala/org/apache/livy/utils/SparkKubernetesApp.scala
Line 446 in 1f6bd7a
Also this,
incubator-livy/server/src/main/scala/org/apache/livy/utils/SparkKubernetesApp.scala
Line 689 in 1f6bd7a
The text was updated successfully, but these errors were encountered: