david-rh / pipelines-service

Running Tekton on top of KCP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pipelines-service

Pipelines-service provides a SaaS for pipelines. It leverages Kubernetes, Tekton, Tekton Triggers, Tekton Results, Pipelines as Code together with kcp.

Why Pipelines-service?

Tekton and Kubernetes provide a great infrastructure for build pipelines. They come however with some limitations.

  • Multi-tenancy: Kubernetes provides a level of multi-tenancy. CustomResourceDefinitions are however cluster scoped. This induces a coupling between the operator version provided by the platform and what you can use as a tenant. The control plane is also shared between tenants.
  • Scalability: Kubernetes has made easy to distribute load onto many servers and scalability at cloud scale more approachable. Like everything its controle plane has however its limits.
  • Availability and geo-redundancy: Kubernetes control plane is based on an etcd cluster, which is sensible to latency between its members. This restricts what can be done in term of geographical distribution.

kcp helps with mitigating these challenges, pushing the limits to new horizons.

Pipelines as Code is the veneer that brings to the users a great exprience directly from their git repository.

Design

Phase 1

In the first phase Pipelines-service will leverage kcp Transparent-Multi-Cluster capabilities. Tekton and other controllers run directly on Kubernetes workload clusters and process the resources there. kcp syncer ensures that resources (Pipelines, PipelineRuns, etc.) created by users in their workspace are synced onto a workload cluster and the result of the processing reflected back to the user workspace.

This approach has the great advantage of not requiring any change to the controllers.

Controllers know nothing about kcp.

Phase 1 flow

Demo (5mns)

asciicast

Phase 2

In the second phase the controllers used by Pipelines-service are made kcp-aware. This eliminates the need to sync the pipeline resources onto workload clusters and to have operators directly bound to any kubernetes cluster. This brings additional benefits:

  • not being tied up to a version of pipeline CRDs installed on a Kubernetes cluster
  • being able to scale controllers and to distribute their load independently from the Kubernetes clusters
  • flexibility in setting up failure domains

Tekton resource schemas are added only in kcp.

Kubernetes workload clusters know nothing about Tekton. They only run resources like Deployments, Pods and Services.

Phase 2 flow

How do I start?

Running in Kubernetes or OpenShift

You can deploy this PoC to your Kubernetes cluster with the build.sh and run.sh scripts in ckcp folder.

More info here

Running locally

See the development guide for instruction on how to set up a local development environment.

About

Running Tekton on top of KCP

License:Apache License 2.0


Languages

Language:Shell 94.2%Language:Dockerfile 5.8%