Tekton Concepts

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

External

Internal

Overview

Tekton is a cloud-native solution for building CI/CD pipelines. Tekton installs and runs as an extension on your Kubernetes cluster and uses the well-established Kubernetes resource model. Tekton workloads execute inside Kubernetes containers. It is implemented as a set of Kubernetes Custom Resources. It has several components: Tekton Pipelines, Tekton CLI and Tekton Catalog. Once deployed, Tekton can be accessed via Tekton CLI commands or API calls. Tekton is part of the CD Foundation, a Linux Foundation project.

Tekton Runtime Model

Tekton Pipelines tracks the state of a pipeline using Kubernetes annotations, which are projected inside each step container in the form of files with the Kubernetes Downward API. The step container entrypoint binary watches these projected files and will only start the command the step is supposed to execute only if a specific annotation appears as file. For more details see:

Tekton Labels and Annotations

In addition, Tekton Pipelines schedules some containers to run automatically before and after the step containers to support built-in features such as the retrieval of input resources and the uploading the outputs to wherever they are supposed to go.

Task

Task

ClusterTask

A task is available in a certain namespace, while a ClusterTask is available across the entire cluster. A ClusterTask behaves identically to a task. When declaring a ClusterTask in the pipeline definition, the kind sub-field of the taskRef should be explicitly set to ClusterTask. If not specified, kind defaults to Task.

apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
[...]
spec:
  tasks:
    - name: some-cluster-task
      taskRef:
        name: some-task
        kind: ClusterTask
 ...

Custom Task and Run

Custom Task and Run

Step

Step

TaskRun

Include discussion on pod templates:

TaskRun

Pipeline

Pipeline

PipelineRun

PipelineRun

Workspaces

Workspaces

Resource

Resources

Result

Results

Events

Events

Bundles

Bundles

Parameters

Parameters

Resource Management

This section contains a discussion on LimitRange.

Resource Management

Security

Security

Metrics

Tekton Metrics

Hermetic Builds

https://tekton.dev/docs/pipelines/hermetic/

Conditions

https://tekton.dev/docs/pipelines/conditions/

Conditions are deprecated, use when expressions instead.

Programming Model

Process Task Authoring Recommendations: https://github.com/tektoncd/catalog/blob/main/recommendations.md

Variables

TO PROCESS:

Code Examples

Start the list here:

  • How to do this
  • How to do that

Playground

https://github.com/ovidiuf/playground/tree/master/tekton

Tekton Components

Tekton Pipelines

https://github.com/tektoncd/pipeline/blob/main/docs/README.md

Tekton Pipelines is the component that implements the core functionality of Tekton and sets the foundation for other components. It is implemented as a set of Kubernetes Custom Resources.

Tekton Pipeline Runtime

Tekton Pipelines Controller

Tekton Pipelines Webhook

Tekton Pipeline Operations

Tekton CLI

Tekton CLI

Tekton API

Tekton APIs are currently available for Pipelines and Triggers allow you to programmatically interact with the Tekton components.

Tekton Catalog

Tekton Catalog

Tekton Hub

Tekton Hub

Tekton Triggers

Tekton Triggers

Tekton Dashboard

Tekton Dashboard

Tekton Operator

Tekton Operator

HA Support

Tekton Operations | HA Support