-
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
Failed to pull OCI bundle from private registry #6359
Comments
Same problem. I follow the doc and tekton taskrun is not working for me . My yamls: apiVersion: v1
kind: ServiceAccount
metadata:
name: tekton
imagePullSecrets:
- name: tekton
---
apiVersion: tekton.dev/v1beta1
kind: TaskRun
metadata:
name: hello-task-run-private-bundle
spec:
serviceAccountName: tekton
taskRef:
resolver: bundles
params:
- name: bundle
value: ghcr.io/liangyuanpeng/tekton:task-hello
- name: name
value: hello
- name: kind
value: task
- name: serviceAccount
value: tekton This is the error log: * failed to get task: resource request in progress
Warning Failed 14s TaskRun failed to get task: error requesting remote resource: error getting "bundleresolver" "default/bundles-95376cec82c97b72a22333a02a4b76de": cannot retrieve the oci image: GET https://ghcr.io/token?scope=repository%!A(MISSING)liangyuanpeng%!F(MISSING)tekton%!A(MISSING)pull&service=ghcr.io: UNAUTHORIZED: authentication required
Warning InternalError 14s TaskRun 1 error occurred:
* failed to get task: error requesting remote resource: error getting "bundleresolver" "default/bundles-95376cec82c97b72a22333a02a4b76de": cannot retrieve the oci image: GET https://ghcr.io/token?scope=repository%!A(MISSING)liangyuanpeng%!F(MISSING)tekton%!A(MISSING)pull&service=ghcr.io: UNAUTHORIZED: authentication required Tekton Pipeline version:
|
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
/remove-lifecycle stale this is still a problem |
So looking at https://tekton.dev/docs/pipelines/auth/ a bit, Tekton usually looks at attached secrets from the ServiceAccount, and not necessarily the Does it work with the following ?
|
I'm also experiencing the same issue with the |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
@tekton-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Expected Behavior
When using OCI bundles feature, I expect a Task Run with an OCI bundle Task reference will use the Docker Config Kubernetes secret (referenced in the Service Account) to access a private registry.
Actual Behavior
I receive a 401 error.
Steps to Reproduce the Problem
Apply the following:
kubectl create
a TaskRun (file adapted from example):The above works when the bundle is in a public registry, but not when the bundle is in a private registry.
The secret works as I am able to docker login and docker pull the bundle using the secret.
I am also able to run TektonTasks with an inline
taskSpec
. The Task Step referenced an image from the same private registry. Tekton is able to mount the same secret (which has entire registry read scope) and have Kubernetes pull the image to run in the Task Step. This issue therefore differs slightly from previously reported issues #3604 and #6276.A difficulty I have had in attempting to debug this is that the error message does not indicate which service account, secret name, or namespace, it has attempted to mount secrets from.
As part of this debugging, I tried the above TaskRun with non-existent/invalid service account names. This also results in a 401 error. (unrelated to the core issue, but I would have expected a different error related to the non-existent service account.)
Additional Info
Kubernetes version:
Output of
kubectl version
:Tekton Pipeline version:
Output of
tkn version
orkubectl get pods -n tekton-pipelines -l app=tekton-pipelines-controller -o=jsonpath='{.items[0].metadata.labels.version}'
The text was updated successfully, but these errors were encountered: