From d3b285634db15cd3d9d67c241d9da8f521f29a02 Mon Sep 17 00:00:00 2001 From: Dibyo Mukherjee Date: Tue, 7 Dec 2021 09:57:37 -0500 Subject: [PATCH] [TEP-0098] Workflows - Problem Statement Signed-off-by: Dibyo Mukherjee --- teps/0098-workflows.md | 313 +++++++++++++++++++++++++++++++++++++++++ teps/README.md | 1 + 2 files changed, 314 insertions(+) create mode 100644 teps/0098-workflows.md diff --git a/teps/0098-workflows.md b/teps/0098-workflows.md new file mode 100644 index 000000000..3b8f9a4eb --- /dev/null +++ b/teps/0098-workflows.md @@ -0,0 +1,313 @@ +--- +status: proposed +title: Workflows +creation-date: '2021-12-06' +last-updated: '2021-12-06' +authors: +- '@dibyom' +--- + +# TEP-0098: Workflows + + + + + + + + +- [Summary](#summary) +- [Motivation](#motivation) + - [Goals](#goals) + - [Non-Goals](#non-goals) + - [Use Cases](#use-cases) +- [Requirements](#requirements) +- [Proposal](#proposal) + - [Notes/Caveats (optional)](#notescaveats-optional) + - [Risks and Mitigations](#risks-and-mitigations) + - [User Experience (optional)](#user-experience-optional) + - [Performance (optional)](#performance-optional) +- [Design Details](#design-details) +- [Test Plan](#test-plan) +- [Design Evaluation](#design-evaluation) +- [Drawbacks](#drawbacks) +- [Alternatives](#alternatives) +- [Infrastructure Needed (optional)](#infrastructure-needed-optional) +- [Upgrade & Migration Strategy (optional)](#upgrade--migration-strategy-optional) +- [Implementation Pull request(s)](#implementation-pull-request-s) +- [References (optional)](#references-optional) + + +## Summary + + +This TEP introduces the experimental Workflows API. The goal is to provide a way for users to set up and manage end to end CI/CD workflow configuration in a single place by relying on other Tekton primitives like Pipelines and Triggers. + + +## Motivation + +An end to end CI/CD system consists of a number of pieces e.g. triggering the pipeline off of some events (git push), actually running the pipeline, notifying the end users of the run status, storing the run results for later usage etc. + +Tekton today contains a number of these pieces that can be combined together to build a full CI/CD system. This loosely coupled flexible approach allows users to only use the portions of Tekton that they need. For example, users can use Pipeline with their own triggering system, or they can use both Pipelines and Triggers but use their own CLI or visualization mechanism. + +This flexibility comes with increased verbosity and configuration management burden. For a CI/CD system that uses Tekton end to end, users have to maintain multiple CRDs (sometimes with duplicate information). These files have to be managed and kept in sync manually. In many cases, changes in one will require changes in others e.g updating a pipeline with a new parameter would mean adding a new parameter to the TriggerTemplate as well as the TriggerBinding. Users will then have to ensure the cluster is updated with both the new pipeline as well as trigger configuration. + +Most CI/CD workflows also require interactions with external systems such as GitHub. Tekton today does not provide a way to declare these in a standardized way making it harder to visualize and debug the entire end to end workflow in a single place e.g. it is hard to visualize all pipeline runs for a given repository. + +Standardizing all of the configuration in one place can also enable some enterprise use cases. For instance, platform users can control the Workflow resource fields such as service accounts, secret configuration for various third party integrations while the app developer teams can still manage the actual pipeline definition in code + +A Workflow resource can be the single entry point for the end to end CI/CD configuration and +simplify the Tekton experience. It can provide a single place to declare all the pieces that are needed for the complete workflow including third party resources (secrets, repositories) that are used by multiple Tekton systems. + +### Goals + + + +* Provide a way to describe entire CI/CD configuration (not just pipeline definition) in a single place +* Make managing Tekton configuration less verbose and repetitive. +* Support end to end CI workflows from source control +* Make it easier and simpler for end users to get started with a pure Tekton CI system +* Allow clear separation of concerns between platform developers and app teams +* Allow for clear separation between run configuration and pipeline definition? + +### Non-Goals + + +* Non CI/CD pipelines +* Installation/deployment of other Tekton projects that Workflows needs as pre-requsities + +### Use Cases + + + +1. End users can set up an entire end to end CI pipeline (from source back to run results) using only Tekton +1. End users can visualize runs grouped by repository +1. End users can create an end to end CI/CD workflow e.g. no scripts to set up webhooks, GH Apps etc. + +1. Platform teams can control or restrict access to portions of the CI/CD workflow e.g. service accounts, access to secrets etc. +1. A company has a centralized devops team rebuilding their CD system on Tekton components. They would like a way to abstract a lot of the boilerplate and setup involved when onboarding new teams to the system. Rather than write a new DSL they elect to use Tekton Workflows since it allows them to move more quickly than building and supporting their own solution would. + +## Requirements + + + +## Proposal + + + +### Notes/Caveats (optional) + + + +### Risks and Mitigations + + + +### User Experience (optional) + + + +### Performance (optional) + + + +## Design Details + + + +## Test Plan + + + +## Design Evaluation + + +## Drawbacks + + + +## Alternatives + + + +## Infrastructure Needed (optional) + + + +## Upgrade & Migration Strategy (optional) + + + +## Implementation Pull request(s) + + + +## References (optional) + + diff --git a/teps/README.md b/teps/README.md index e14f02ced..236559499 100644 --- a/teps/README.md +++ b/teps/README.md @@ -234,4 +234,5 @@ This is the complete list of Tekton teps: |[TEP-0090](0090-matrix.md) | Matrix | proposed | 2021-11-08 | |[TEP-0094](0094-configuring-resources-at-runtime.md) | Configuring Resources at Runtime | implementable | 2021-11-29 | |[TEP-0096](0096-pipelines-v1-api.md) | Pipelines V1 API | proposed | 2021-12-13 | +|[TEP-0098](0098-workflows.md) | Workflows | proposed | 2021-12-06 | |[TEP-0100](0100-embedded-taskruns-and-runs-status-in-pipelineruns.md) | Embedded TaskRuns and Runs Status in PipelineRuns | proposed | 2022-01-29 |