tektoncd / pipeline

A cloud-native Pipeline resource.
https://tekton.dev
Apache License 2.0
8.45k stars 1.77k forks source link

Can not find local image of controller. (Not sure if it is bug) #7743

Open 4t8dd opened 7 months ago

4t8dd commented 7 months ago

Expected Behavior

tekton can find these images locally.

Actual Behavior

I tried to install tekton locally. So I manually pull the images from remote to local with ctr. The pods of tekton are all good. But when I try to run some task, the image can not be found even I have got it locally. It looks like tekton was trying to pull images from remote anyway. The images are these(I just changed the tag for my convenience):

- -entrypoint-image
        - gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/entrypoint:latest
        - -nop-image
        - gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/nop:latest
        - -sidecarlogresults-image
        - gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/sidecarlogresults:latest
        - -workingdirinit-image
        - gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/workingdirinit:latest
        - -shell-image
        - cgr.dev/chainguard/busybox:latest
        - -shell-image-win
        - mcr.microsoft.com/powershell:latest

I import these images with ctr -n=k8s.io i import ./some.tar and create a new namespace for the task.

Steps to Reproduce the Problem

just try to run tekton purely locally.

Additional Info

lient Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.4", GitCommit:"fa3d7990104d7c1f16943a67f11b154b71f6a132", GitTreeState:"clean", BuildDate:"2023-07-19T12:20:54Z", GoVersion:"go1.20.6", Compiler:"gc", Platform:"darwin/arm64"}
Kustomize Version: v5.0.1
Server Version: version.Info{Major:"1", Minor:"28+", GitVersion:"v1.28.3-aliyun.1", GitCommit:"7b6ea506b6deb03bac7aaeb10f6ee0a99004b147", GitTreeState:"clean", BuildDate:"2023-10-19T07:10:40Z", GoVersion:"go1.20.10", Compiler:"gc", Platform:"linux/amd64"}
Client version: 0.35.1
Pipeline version: v0.57.0
vdemeester commented 6 months ago

Hey @4t8dd, what is/are the Task definition ? Especially the image part of the step(s). Each Task can have multiple steps, each step using an oci image that is defined by the user. So if you are in an airgapped environment (aka cannot pull from external network), you need to make sure to also import any oci image used in the Task you want to run, to be able to run them.