Skip to content
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

Resources for Tasks with many images in the same registry are repetitive #569

Closed
bobcatfish opened this issue Mar 1, 2019 · 2 comments
Closed
Labels
design This task is about creating and discussing a design help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. maybe-next-milestone For consideration when planning the next milestone

Comments

@bobcatfish
Copy link
Collaborator

Expected Behavior

If I'm creating a Task that needs to build a lot of images, that means I need to provide many image resources. If these all need to get pushed to the same image registry, it would be great if I only needed to provide this information once.

Actual Behavior

While working on #528 I started to create a Task that can publish all the images required for this project. There are a lot of them tho and so what I've currently got is something like this:

---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
  name: entrypoint-image
spec:
  type: image
  params:
   - name: url
     value: gcr.io/christiewilson-catfactory/entrypoint # Replace this with your own image registry
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
  name: kubeconfigwriter-image
spec:
  type: image
  params:
   - name: url
     value: gcr.io/christiewilson-catfactory/kubeconfigwriter # Replace this with your own image registry
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
  name: creds-init-image
spec:
  type: image
  params:
   - name: url
     value: gcr.io/christiewilson-catfactory/creds-init # Replace this with your own image registry
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
  name: git-init-image
spec:
  type: image
  params:
   - name: url
     value: gcr.io/christiewilson-catfactory/git-init # Replace this with your own image registry
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
  name: nop-image
spec:
  type: image
  params:
   - name: url
     value: gcr.io/christiewilson-catfactory/nop # Replace this with your own image registry
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
  name: bash-image
spec:
  type: image
  params:
   - name: url
     value: gcr.io/christiewilson-catfactory/bash # Replace this with your own image registry
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
  name: gsutil-image
spec:
  type: image
  params:
   - name: url
     value: gcr.io/christiewilson-catfactory/gsutil # Replace this with your own image registry
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
  name: controller-image
spec:
  type: image
  params:
   - name: url
     value: gcr.io/christiewilson-catfactory/controller # Replace this with your own image registry
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
  name: webhook-image
spec:
  type: image
  params:
   - name: url
     value: gcr.io/christiewilson-catfactory/webhook # Replace this with your own image registry

If someone wants to use the Task that consumes these with their own registry, they're going to have to change each of those url values.

Additional Info

Note that these images are built using ko, which doesn't take as input information about individual images, it just takes the KO_DOCKER_REPO

@bobcatfish bobcatfish added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. design This task is about creating and discussing a design labels Mar 1, 2019
@abayer
Copy link
Contributor

abayer commented Mar 4, 2019

Would need to be overridable per-image, I'd assume?

@bobcatfish bobcatfish added the maybe-next-milestone For consideration when planning the next milestone label Jun 20, 2019
@bobcatfish
Copy link
Collaborator Author

I think the future of the image resource is going to look very different from what we have today (#1673) - and with Tasks able to emit results (e.g. in this example https://github.com/tektoncd/pipeline/blob/master/docs/migrating-v1alpha1-to-v1beta1.md#replacing-pipelineresources-with-tasks) it seems like image resources really arent that useful. So I'm going to close this for now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design This task is about creating and discussing a design help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. maybe-next-milestone For consideration when planning the next milestone
Projects
None yet
Development

No branches or pull requests

2 participants