-
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
Is there a way to authenticate with an image resource's registry? #1106
Comments
hey @lance Did you try with what's described in |
@vdemeester so I have been trying to get this to work for a while now, but am still not successful. Let me provide a little more detail and perhaps you can tell me if I'm trying to do something that's just not possible yet. A process external to pipelines (nodeshift) generates an apiVersion: tekton.dev/v1alpha1
kind: TaskRun
metadata:
name: deploy-webapp-taskrun
spec:
# Use service account with git and image repo credentials
serviceAccount: pipeline
taskRef:
name: deploy-webapp
inputs:
resources:
- name: source-image
resourceSpec:
type: image
params:
- name: url
value: image-registry.openshift-image-registry.svc:5000/example-webapp
outputs:
resources:
- name: runtime-image
resourceSpec:
type: image
params:
- name: url
value: quay.io/lanceball/example-webapp-runtime The |
Just a little more info - here is the log file from the
And this is a little snipped of output showing that the authentication has been set up.
The error message is |
It just struck me that you are using the image resource /kind feature |
@vdemeester so I managed to get this to work. The resources, tasks and pipelines are here, if you are interested. It's actually not as complicated as I thought - mostly it was misconfiguration on my part. But the long and short is that I am able to specify an image from the internal repository as an input resource on a task and it works as I expect. I'm closing this. Thanks for your help. |
Expected Behavior
I am attempting to use an image as an input resource, and it actually seems as though it might work, however I am running into problems due to the fact that the registry requires authentication.
My use case is that I have another process outside of the Tekton pipeline purview which creates an image and pushes it to a registry. My
Task
then needs to access this image from the registry and copy some data from the running container to a volume mount.Here is a simple example showing just the input.
I would like a way to specify authentication credentials for the pipeline when accessing the
source-image
in this example. Is this possible?Actual Behavior
When running a
Task
for this I get an error message on thedeploy-webapp-task-run
container.Steps to Reproduce the Problem
Task
to a clusterTaskRun
that specifies asource-image
on a registry requiring authenticationTaskRun
to a clusterAdditional Info
While looking for a way to achieve this, I stumbled on this issue #260 which is related. Given that I am getting authentication errors when the
TaskRun
executes, I think maybe that issue is resolved, but it is not clear since I have never made it past the authentication requirement.The text was updated successfully, but these errors were encountered: