-
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
How to use config-artifact-bucket ConfigMap in pipeline #2319
Comments
Hi, sorry for the confusion! I have to admit I had trouble finding documentation on this. The only thing I could find is here: https://github.com/tektoncd/pipeline/blob/master/docs/developers/README.md#how-are-resources-shared-between-tasks To cut a long story short, PipelineResources can be used as an |
Hello, thank You for reply. I saw that but im still confused. When im creating "output" i still need to add "resourceRef" in "higher" level - PipelineRun with ref to another PipelineResource created BTW it doesn not want to work with s3. Here is my PipelineResource.
and here i need to ref to them to satisfy checks during applying:
Without that ref im getting information i defined resource and need to configure it in higher level. Here is how i have them configured in task:
Is there difference between:
and
? When Im trying to add it in order like in doc You linked:
Im getting:
|
Hey @holoGDM it looks like you might be mixing the storage resource + config-artifact-bucket up a bit, they are actually very different things. config-artifact-bucket is trying to solve a very specific problem: Tasks run on different nodes, so if you want to share data between them, it has to get from node to node somehow. When you link a PipelineResource output in one Task (running on one node) with a PipelineResource input in another Task (running on a different node), config-artifact-bucket lets you control how that PipelineResource data gets between the Tasks. By default Tekton will try to create a PVC for this, but config-artifact-bucket lets you use something like GCS or S3 for this instead, meaning the data is automatically uploaded and downloaded between Tasks. The storage resource on the other hand lets a Task explicitly indicate that it wants to upload/download. If you are explicitly trying to upload something to s3, you can probably completely ignore config-artifact-bucket - especially if you can use workspaces to share the data between Tasks, then have a Task that uses the storage resource to do the final upload. These are the docs on how to use output resources with v1beta1: https://github.com/tektoncd/pipeline/blob/master/docs/tasks.md#specifying-resources - it looks like in your example above outputs + resources are inverted, what you want is something like: apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: downloader-images-rpms
namespace: installer
spec:
resources:
outputs:
- name: s3-workspace
type: storage Looks like https://github.com/tektoncd/pipeline/blob/master/docs/developers/README.md#how-are-resources-shared-between-tasks is out of date :( |
With tektoncd#1185 we resolved a lot of confusion and inconsistency around how we nested things with input/output, but we didn't update our developer docs :( In tektoncd#2319 we pointed someone toward these docs and the person ended up using the old syntax and being confused :(
Thanks for reply. I wanted like You wrote to share artifacts between tasks. But when im using output/input between tasks im forced by Tekton checker when im applying my yamls to configure my own s3 buckets (they are not working either - my s3 bucket is creted with rook and i needed finally to create special task for pushing with s3cmd client). According to my workspaces. i wanted to avoid usage of them and use my s3 default bucket but like i wrote im getting information that i specified outputs/intput and i need to configure "resourceRef" for them. Look at my configs above. EDIT: Thank You for helping |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten 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. |
What config-artifact-bucket is for? I can not find how to use it. When i will create task with output type "storage" in pipeline and pipelinerun i need to configure separate bucket for that output. Thought it will take those default settings.
Eg:
And now need to configure in pipeline it in such way:
and in pipelinerun:
so i need to create separate tekton-s3 PipelineResource manually. Whats for are that settings in config-artifact-bucket if tekton is not taking them for storage output automatically?
/kind question
The text was updated successfully, but these errors were encountered: