-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
kfp _generate_kaniko_spec permissions under workload identity #2814
Comments
Thanks for reporting, this is tracked in #1691 (comment) |
I'm starting to work on this. Here are my initial thoughts: Full Kubeflow will be different from Standalone:
So the question is how can we design the interface, so that users can have the full configurability for their own envs, while provide an easy on boarding experience for the three default environments above. |
When I read ContainerBuilder code, one thing was especially confusing to me. We only export
While ContainerBuilder is actually not exported in the module. It needs to be imported by The interface design seems contradicting, should we expect users instantiate their own ContainerBuilder or not? |
@Ark-kun @numerology Do you have any insights on this? |
You're correct. There is a contradiction. |
BTW, the default |
@Bobgy Is there any way we can exclude the service account name from the spec and still have it working? |
Thanks for the context! What was the reason then? It seems to solve this issue, we must allow users to control ContainerBuilder arguments. |
Do you mean adding some runtime resolution logic? I think we need a way to figure out how KFP was deployed, is it Kubeflow/AI platform or standalone? It might be good if e.g. we have a configmap in the cluster with related information on how to launch kaniko builders. Will sdk have enough permissions to query that configmap? Also, which namespace should that configmap live? I think for Kubeflow multi user mode, it should live in user's namespace. So we must expose ContainerBuilder and let users choose their own namespaces. Then another problem comes, how can we configure a configmap in every user's namespace. We must have a controller to support that. It seems too much overhead to get this problem solved. Another solution I just thought of, maybe we can add an kfp api server endpoint to tell what is the recommended configuration for container builder, so that we can always configure api server with response good as default value for different environments. Again, this requires change to other systems. That's probably too much and might be fragile. I think the easiest solution is to just let user specify a enum to tell which deployment they are using and use different defaults accordingly. While we provide a way to override the container's spec by themselves, so it's extensible in any custom environment. |
What happened:
Testing the pipelines notebook examples under Kubeflow 0.7 using Workload Identity on Google Kubernetes Engine.
The container_build example fails because
_generate_kaniko_spec
creates a pod running under thedefault
Kubernetes service account which has no associated/bound GCP service account and therefore does not have necessary permissions to interact with GCS/GCR.The generated kaniko pod logs show a 403 error like the following:
What did you expect to happen:
_generate_kaniko_spec
creates a pod spec which executes successfully.What steps did you take:
When using KFP under Kubeflow 0.7 with workload identity you can resolve the issue by modifying
_container_builder.py
to generate a pod spec which runs under thedefault-editor
service account as that is bound to a GCP service account with suitable privileges.pipelines/sdk/python/kfp/containers/_container_builder.py
Line 137 in 52b56e9
Anything else you would like to add:
How I am starting the notebook to get things working:
The text was updated successfully, but these errors were encountered: