-
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
Not using secret when pulling from private Registry #695
Comments
The following steps should be followed to grant the permissions: |
I am not on GKE, but everything is on Azure (Company Policy). I added the secret to the Cluster
I cannot use the gcp tool, since I am on Azure, right? Also where do I have to add the .apply() command, in the decorator, the ContainerOp or during Compiling? This is my current "test" pipeline-component:
I added the name of the secret directly in the yaml after compiling and just repackaged the tar.gz and reuploaded. But still I receive an authenticate error. I am not on master branch but release 4.0, if this is an issue? Thanks |
My mistake about using use_gcp_secrets(), which is to grant permissions for gcloud commands inside the container. imagePullSecrets:
|
Marcel, kfp uses the same way that k8s uses to pull the image. Could you try to create a pod in your cluster by using the imagePullSecrets directly? It can make sure that the secret is configured correctly. |
I added the imagePullSecrets under the container parameter, not the workflow param. I will test on Monday and report. Also is there a way or will there be a way to specify this inside the pipeline code for non GKE users? Thanks |
@gaoning777 Thank you, this way works. I would add it to the offical documentation on the kubeflow website. Also is there a way to do this in Python code, like you suggested earlier but on a non GKE cluster? Right now I have to compile the pipeline, extract the archive, change the yaml and build the archive again? Thats a little bit overhead :-) Thanks |
We are trying to offer a product that is kubernetes native(platform independent). |
I had a quick look into everything and came up with the following ideas: For all pipelinesThe easiest way to integrate a secret to a pod is to add it to the corresponding service account (in our case pipeline-runner), as can been seen here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account
This however allows every pipeline (every pod created by pipeline-runner) in the cluster to access the secret, it is therefore a slight security concern or isn't it? For all components of one pipelineTherefore the compiler.py of the Pipeline SDK has to be changed. The user has to give the Compiler the name of the secret and it has to be add to the basic workflow yaml in the function _create_pipeline_workflow (line 465 of compiler.py). This would however expose the secret to all components in the pipeline, I think this is a good start but still what if someone wants to use different private registries for each component? This would not work using this approach, but as far as I am aware Argo does not support this (yet)? Also we should discuss if this is neccessary at all. For a single component of one pipelineAs mentioned above, is this even neccessary? If so the secret has to be added to each container entry of a template and, as far as my testing goes, this doesn't work :-/ |
Argo only supports workflow level imagepullsecret, which makes the pipeline impossible to support component level imagepullsecret. |
supporting pipeline level imagepullsecret in #745 |
Awesome thanks, I think Pipeline level secret is enough for most use cases. I will test once the PR is accepted. |
PR merged. But wait for the next release that will include the feature. |
I am having the same problem but I cant figure out, neither in the examples or docs, where I can set pipelines configs, could you provide an example? |
The easiest solution is to assign the secret to the pipeline runner service account. |
Hello,
I am trying out the new Pipeline Features but I cannot get a Pipeline working pulling containers from a private (Azure) Registry. I tried pulling everything localy and it works. I created a secret using these instructions https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
I also added the secret to the yaml of the pipeline (also is there a way to this using the compiling tool?):
But still the pipeline fails with an authentication error, here are the last events of the corresponding pod:
Thanks very much.
Marcel
The text was updated successfully, but these errors were encountered: