-
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
Unable to run Tekton pipelines locally since move away from InitContainers #591
Comments
Whoops, looks like a bug for sure, sorry for the hassle!! We'll get on this right away btw awesome issue write up @a-roberts thanks so much 🙏 |
Blech, my internet connection is terrible and I've never actually used Docker for Mac in a meaningful way, so I don't think I can get this reproduced locally. If someone else can tackle it, that'd probably be for the best. |
/assign |
To complete a bit the bug decription, it's also the case on apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: skaffold-git
spec:
type: git
params:
- name: revision
value: master
- name: url
value: https://github.com/GoogleContainerTools/skaffold
---
#Builds an image via kaniko and pushes it to registry.
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: build-simple
spec:
inputs:
resources:
- name: workspace
type: git
params:
- name: pathToDockerFile
description: The path to the dockerfile to build
default: /workspace/workspace/Dockerfile
- name: pathToContext
description: The build context used by Kaniko (https://github.com/GoogleContainerTools/kaniko#kaniko-build-contexts)
default: /workspace/workspace
steps:
- name: build-simple
image: docker.io/library/busybox
command:
- /bin/sh
args:
- -c
- "ls -l ${pathToDockerFile} ${pathToContext}"
---
apiVersion: tekton.dev/v1alpha1
kind: TaskRun
metadata:
name: build-simple
spec:
taskRef:
name: build-simple
trigger:
type: manual
inputs:
resources:
- name: workspace
resourceRef:
name: skaffold-git
params:
- name: pathToDockerFile
value: Dockerfile
- name: pathToContext
value: /workspace/workspace/examples/microservices/leeroy-web Thinking outloud of possible fixes and workaround :
I'm gonna go ahead and fix |
For full context see https://knative.slack.com/archives/CDCQ72D0R/p1551956671118100
Caveat: we are doing this locally and our pipeline involves resources. We're creating the PipelineRun and the resources through Go code - something we plan to contribute as an example, based on receiving a webhook from a repository. I don't know if this is a problem with our own code or with Knative itself, just that since the move away from InitContainers we have the problem. Am I missing something?
Expected Behavior
Follow the docs for local development here and you should be able to create PipelineRuns that run successfully locally, using images from your local Docker registry. Pipelines and all associated tasks should run perfectly.
Actual Behavior
PipelineRuns fail citing tasks are not found:
Tasks exist in the Kube sense but not in the images sense (If I do
kubectl get tasks
, I do see my tasks).Steps to Reproduce the Problem
kubectl get pipelinerun -o json
and observe that none of your tasks are run successfully.Todo: I'm gonna add the noddiest reproduce with tiny tasks and a tiny PipelineRun.
Additional Info
If you git checkout any commit prior to
c0285b30e9720ea4f1a0666c97db424362b411b5
, there are no problems. The PipelineRun progresses to completion.I believe the tasks should now be containers/images that are pushed to the local registry and we should be able to pull from them. I think the images do exist but they can't be pulled.
I've never had to use pull secrets locally and we're using the default service account (there wouldn't be any credentials anyway for my insecure lil registry).
We have a couple theories involving changes in entrypoint.go regarding authorization and another involving the use of
ko
.Hopefully we just need to add to the docs again or it's a minor config issue on my end.
@abayer @pivotal-nader-ziada FYI
Here are the task definitions:
build-task.yaml:
deploy-task.yaml:
(we replace the needle here with the commit ID so you can build and push your latest code)
pipeline.yaml:
The text was updated successfully, but these errors were encountered: