Skip to content
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

How to bind the image pull secret for pipeline without service account? #2339

Closed
Tracked by #87
kevinyu98 opened this issue Apr 6, 2020 · 7 comments
Closed
Tracked by #87
Labels
kind/question Issues or PRs that are questions around the project or a particular feature

Comments

@kevinyu98
Copy link

Expected Behavior

We have a use case where we need to bind the image pull secret to a particular pipeline but not service account, because we might not have permission to cleanup the service account, is there a workaround this?

Additional Info

  • Kubernetes version:

    Output of kubectl version:
    openshift:
    Client Version: v4.3.1
    Kubernetes Version: v1.16.2

    (paste your output here)
    
  • Tekton Pipeline version:

    Output of tkn version or kubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'

Tekton version: v0.11.0-rc2

@Tomcli
Copy link
Contributor

Tomcli commented Apr 6, 2020

Probably if we can implement imagePullSecrets into podTemplate, then we can solve this issue. But is this a good approach?

@bobcatfish
Copy link
Collaborator

Hey @kevinyu98 can you explain more about why you can't use the service account and what you need to use the image pull secret for? Some examples would really help!

@bobcatfish bobcatfish added kind/question Issues or PRs that are questions around the project or a particular feature triage/needs-information Indicates an issue needs more information in order to work on it. labels Apr 8, 2020
@skaegi
Copy link
Contributor

skaegi commented Apr 8, 2020

One workaround / approach that has worked well for us is to create an ephemeral namespace and then configure the namespace's "default" service account with permissions as needed. We then "apply" the various Tekton and other resources in the namespace and wait for the PipelineRun to complete, collect the results, and finally delete the ephemeral namespace. All-in-all it's pretty tidy.

@Tomcli
Copy link
Contributor

Tomcli commented Apr 8, 2020

Thanks @bobcatfish @skaegi

We need image pull secret to pull images from our private repository. We are building a compiler to generate Tekton pipeline based on the Kubeflow pipeline DSL. In our platform, we have multiple users that share the same namespace for executing pipelines. Therefore, we want to replicate the behavior of Argo pipeline where the image pull secret is bound to a particular pipeline instead of the service account.

We are trying to work around with the service account right now, but since some of our users can be anonymous, we have to ask our server to watch and cleanup the service account for every pipeline. Thus, we want to look for an easier approach such as adding image pull secret into podTemplate.

@skaegi
Copy link
Contributor

skaegi commented Apr 9, 2020

In terms of just creating the binding independent of service account management, I think the podTemplate approach suggested by @Tomcli is a reasonable approach and is identical to what Argo does. I re-opened #1779.

@animeshsingh
Copy link

thanks @skaegi any update on this?

@ghost ghost removed the triage/needs-information Indicates an issue needs more information in order to work on it. label Apr 27, 2020
@ghost
Copy link

ghost commented Apr 27, 2020

Now that #1779 is reopened I think this issue can be considered a duplicate or case-study in support of it. So I'm going to close this issue and suggest that discussion of imagePullSecrets in podTemplate should be focused there. Many thanks!

@ghost ghost closed this as completed Apr 27, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Issues or PRs that are questions around the project or a particular feature
Projects
None yet
Development

No branches or pull requests

5 participants