tektoncd / chains

Supply Chain Security in Tekton Pipelines
Apache License 2.0
246 stars 129 forks source link

Pushing kaniko-chains to kind-registry #1199

Open nistar opened 3 weeks ago

nistar commented 3 weeks ago

I was wondering if anyone else got the following error while running tkn task start --param IMAGE=kind-registry:5000/kaniko-chains --use-param-defaults --workspace name=source,emptyDir="" --workspace name=dockerconfig,secret=docker-credentials kaniko-chains

"https://kind-registry:5000/v2/": http: server gave HTTP response to HTTPS client?

I've added that repo to insecure registries for my local docker engine:

Insecure Registries: kind-registry:5000 127.0.0.0/8

lcarva commented 3 weeks ago

I usually do something like this:

# Change this to the name of your kind cluster
export KIND_CLUSTER_NAME=kind

export KO_DOCKER_REPO='kind.local'

ko apply --sbom none -f <(
  kubectl -n tekton-chains patch deployment tekton-chains-controller --type='json' \
  -p '[{
        "op": "replace",
        "path": "/spec/template/spec/containers/0/image",
        "value": "ko://github.com/tektoncd/chains/cmd/controller"
      }]' \
  --dry-run=client -o yaml
)