Tekton Concepts: Difference between revisions
(12 intermediate revisions by the same user not shown) | |||
Line 58: | Line 58: | ||
=<span id='Bundle'></span>Bundles= | =<span id='Bundle'></span>Bundles= | ||
{{Internal|Tekton Bundle#Overview|Bundles}} | {{Internal|Tekton Bundle#Overview|Bundles}} | ||
=Parameters= | =Parameters= | ||
{{Internal|Tekton_Parameters|Parameters}} | {{Internal|Tekton_Parameters|Parameters}} | ||
Line 71: | Line 68: | ||
=Metrics= | =Metrics= | ||
{{Internal|Tekton Metrics#Overview|Tekton Metrics}} | {{Internal|Tekton Metrics#Overview|Tekton Metrics}} | ||
=Hermetic Builds= | |||
{{External|https://tekton.dev/docs/pipelines/hermetic/}} | |||
=Conditions= | |||
{{External|https://tekton.dev/docs/pipelines/conditions/}} | |||
Conditions are deprecated, use <code>[[Tekton_Pipeline#Conditional_Execution_with_when|when]]</code> expressions instead. | |||
{{External|https://tekton.dev/docs/ | |||
= | |||
{{External|https:// | |||
< | |||
=Programming Model= | =Programming Model= | ||
Line 143: | Line 89: | ||
==Code Examples== | ==Code Examples== | ||
<font color=darkkhaki> | |||
<font color=darkkhaki> | |||
* Code Examples: https://tekton.dev/docs/pipelines/tasks/#code-examples | * Code Examples: https://tekton.dev/docs/pipelines/tasks/#code-examples | ||
* Code Examples: https://github.com/tektoncd/pipeline/tree/main/examples | * Code Examples: https://github.com/tektoncd/pipeline/tree/main/examples | ||
Line 151: | Line 96: | ||
* Pipeline code examples: https://github.com/tektoncd/pipeline/tree/main/examples | * Pipeline code examples: https://github.com/tektoncd/pipeline/tree/main/examples | ||
* Variable substitution: https://tekton.dev/docs/pipelines/tasks/#using-variable-substitution | * Variable substitution: https://tekton.dev/docs/pipelines/tasks/#using-variable-substitution | ||
Start the list here: | Start the list here: | ||
* How to do this | * How to do this | ||
* How to do that | * How to do that | ||
</font> | </font> | ||
=Playground= | =Playground= | ||
{{External|https://github.com/ovidiuf/playground/tree/master/tekton}} | {{External|https://github.com/ovidiuf/playground/tree/master/tekton}} | ||
=Tekton Components= | |||
==Tekton Pipelines== | |||
{{External|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 [[Kubernetes_Custom_Resources|Custom Resources]]. | |||
===Tekton Pipeline Runtime=== | |||
====Tekton Pipelines Controller==== | |||
====Tekton Pipelines Webhook==== | |||
===Tekton Pipeline Operations=== | |||
* [[Tekton_Operations#Installation|Installation]] | |||
==Tekton CLI== | |||
{{Internal|Tekton_CLI#Overview|Tekton CLI}} | |||
==Tekton API== | |||
Tekton APIs are currently available for [[#Pipeline|Pipelines]] and [[#Trigger|Triggers]] allow you to programmatically interact with the Tekton components. | |||
==Tekton Catalog== | |||
{{Internal|Tekton_Catalog#Overview|Tekton Catalog}} | |||
==Tekton Hub== | |||
{{Internal|Tekton_Hub#Overview|Tekton Hub}} | |||
==<span id='Trigger'></span>Tekton Triggers== | |||
{{Internal|Tekton_Triggers#Overview|Tekton Triggers}} | |||
==Tekton Dashboard== | |||
{{Internal|Tekton_Dashboard#Overview|Tekton Dashboard}} | |||
==Tekton Operator== | |||
{{Internal|Tekton_Operator#Overview|Tekton Operator}} | |||
==HA Support== | |||
{{Internal|Tekton_Operations#HA_Support|Tekton Operations | HA Support}} |
Latest revision as of 05:45, 29 April 2022
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:
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
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
Step
TaskRun
Include discussion on pod templates:
Pipeline
PipelineRun
Workspaces
Resource
Result
Events
Bundles
Parameters
Resource Management
This section contains a discussion on LimitRange.
Security
Metrics
Hermetic Builds
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:
- https://tekton.dev/docs/pipelines/variables/
- https://tekton.dev/docs/pipelines/tasks/#using-variable-substitution
- Variables available in a Task https://tekton.dev/docs/pipelines/variables/#variables-available-in-a-task
- Variables available in a Pipeline https://tekton.dev/docs/pipelines/variables/#variables-available-in-a-pipeline
- Fields that accept variable substitutions: https://tekton.dev/docs/pipelines/variables/#fields-that-accept-variable-substitutions
- Using variable substitution in pipelines: https://tekton.dev/docs/pipelines/pipelines/#using-variable-substitution
Code Examples
- Code Examples: https://tekton.dev/docs/pipelines/tasks/#code-examples
- Code Examples: https://github.com/tektoncd/pipeline/tree/main/examples
- TaskRun code examples: https://tekton.dev/docs/pipelines/taskruns/#code-examples
- https://github.com/tektoncd/pipeline/blob/release-v0.35.x/examples/v1beta1/taskruns/run-steps-as-non-root.yaml
- Pipeline code examples: https://github.com/tektoncd/pipeline/tree/main/examples
- Variable substitution: https://tekton.dev/docs/pipelines/tasks/#using-variable-substitution
Start the list here:
- How to do this
- How to do that
Playground
Tekton Components
Tekton Pipelines
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 API
Tekton APIs are currently available for Pipelines and Triggers allow you to programmatically interact with the Tekton components.