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

Design: Deployment build-pipeline-resource #68

Closed
nader-ziada opened this issue Sep 25, 2018 · 4 comments
Closed

Design: Deployment build-pipeline-resource #68

nader-ziada opened this issue Sep 25, 2018 · 4 comments
Labels
design This task is about creating and discussing a design

Comments

@nader-ziada
Copy link
Member

The work for this task is to design this feature and present one or more proposals (before implementing).

Expected Behavior

A common expectation of a pipeline is to deploy the created application/function on some cluster

The deploy resource should satisfy the following requirements:

  • Defined as an output of a Task
  • Can only be used as an output binding, if used as an input will have no-op
  • Can deploy the application/function using a helm chart
  • Helm chart is provided to the resource
  • Follows the standard resource interface and can be created the same way

an example definition of a pipeline

kind: Pipeline
...
spec:
    tasks:
        - name: unit-test-kritis
          taskRef:
              name: make
          inputSourceBindings:
              - name: workspace
                key: kritis
          outputSourceBindings:
              - name: deploy-output
                key: deploy-to-test-cluster               
          params:
              - name: makeTarget
                value: test

and an example of a resource

 ...
apiVersion: pipeline.knative.dev/v1beta1
kind: Resource
metadata:
  name: deploy-to-test-cluster
  namespace: default
spec:  
  name: deploy-to-test-cluster
  type: deploy
  params:
  - name: cluster
    value: kritis-cluster
  ...  

Actual Behavior

We have no resource currently to deploy using helm chart or otherwise

Additional Info

@bobcatfish
Copy link
Collaborator

I like it! I think this should be generic enough that we could define different types of deployers, e.g. kubectl as well as helm

@bobcatfish bobcatfish added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Sep 25, 2018
@bobcatfish bobcatfish modified the milestone: Mid October Demo Sep 28, 2018
bobcatfish referenced this issue in bobcatfish/pipeline Oct 30, 2018
We need to create bindings between the Resources Tasks need and the
Resources we have. We were previously using `key` to identify which of a
Task's Resource needs we were binding one of our existing Resources to,
but @pivotal-nader-ziada pointed out that `Name` is a more
straightforward and clear option.

I considered updating the cluster binding as well, but since #68 is a
work in progress I figured it would cause less conflicts to leave it.

I also deleted `PipelineResourceVersion` b/c this seems to duplicate
`TaskRunResourceVersion`, only exists in `Status`, isn't currently being
used and doesn't have a clear purpose at the moment. We can add those
fields back into `Status` if we feel like we need them later.
bobcatfish referenced this issue in bobcatfish/pipeline Oct 30, 2018
We need to create bindings between the Resources Tasks need and the
Resources we have. We were previously using `key` to identify which of a
Task's Resource needs we were binding one of our existing Resources to,
but @pivotal-nader-ziada pointed out that `Name` is a more
straightforward and clear option.

I considered updating the cluster binding as well, but since #68 is a
work in progress I figured it would cause less conflicts to leave it.

I also deleted `PipelineResourceVersion` b/c this seems to duplicate
`TaskRunResourceVersion`, only exists in `Status`, isn't currently being
used and doesn't have a clear purpose at the moment. We can add those
fields back into `Status` if we feel like we need them later.
knative-prow-robot pushed a commit that referenced this issue Oct 30, 2018
We need to create bindings between the Resources Tasks need and the
Resources we have. We were previously using `key` to identify which of a
Task's Resource needs we were binding one of our existing Resources to,
but @pivotal-nader-ziada pointed out that `Name` is a more
straightforward and clear option.

I considered updating the cluster binding as well, but since #68 is a
work in progress I figured it would cause less conflicts to leave it.

I also deleted `PipelineResourceVersion` b/c this seems to duplicate
`TaskRunResourceVersion`, only exists in `Status`, isn't currently being
used and doesn't have a clear purpose at the moment. We can add those
fields back into `Status` if we feel like we need them later.
@bobcatfish bobcatfish added the design This task is about creating and discussing a design label Nov 6, 2018
@bobcatfish bobcatfish changed the title Design: Helm-Deploy build-pipeline-resource Design: Deployment build-pipeline-resource Jan 5, 2019
@afrittoli
Copy link
Member

In my view a deployment output resource would be the output of a deployment task, so it would contain the metadata which resulted from the deployment, e.g. the release name and version in case of helm and perhaps a cluster resource. This could basically provide a kind of standard interface to tasks / pipelines who wanted to access the deployed "app" and that could work regardless of the deployment technology used in the deployment step.

However I don't think the deployment output resource should take care of the deployment itself, there should be a deployment task. Similar to how the image output resource does not take care of building and pushing an image, it will only receive the metadata of the built image from a kaniko task or some other build task.

@dibyom dibyom removed the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Apr 23, 2020
@dibyom
Copy link
Member

dibyom commented Apr 23, 2020

Don't think this is as relevant anymore given that PipelineResources are not in beta? @sbwsg can we close this?

@ghost
Copy link

ghost commented Apr 23, 2020

Yeah this doesn't look like it's hugely relevant anymore in the face of all the changes that have gone on around resources. If someone does want to revisit this specific idea then they can always reopen.

@ghost ghost closed this as completed Apr 23, 2020
This issue was closed.
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
Projects
None yet
Development

No branches or pull requests

4 participants