-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Put Tekton OCI bundles behind a feature flags 🎏 #3492
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ weight: 4 | |
- [Overview](#overview) | ||
- [Configuring a `PipelineRun`](#configuring-a-pipelinerun) | ||
- [Specifying the target `Pipeline`](#specifying-the-target-pipeline) | ||
- [Tekton Bundles](#tekton-bundles) | ||
- [Specifying `Resources`](#specifying-resources) | ||
- [Specifying `Parameters`](#specifying-parameters) | ||
- [Specifying custom `ServiceAccount` credentials](#specifying-custom-serviceaccount-credentials) | ||
|
@@ -60,7 +61,7 @@ A `PipelineRun` definition supports the following fields: | |
object that supplies specific execution credentials for the `Pipeline`. | ||
- [`serviceAccountNames`](#mapping-serviceaccount-credentials-to-tasks) - Maps specific `serviceAccountName` values | ||
to `Tasks` in the `Pipeline`. This overrides the credentials set for the entire `Pipeline`. | ||
- [`taskRunSpec`](#specifying-task-run-specs) - Specifies a list of `PipelineRunTaskSpec` which allows for setting `ServiceAccountName` and [`Pod` template](./podtemplates.md) for each task. This overrides the `Pod` template set for the entire `Pipeline`. | ||
- [`taskRunSpec`](#specifying-task-run-specs) - Specifies a list of `PipelineRunTaskSpec` which allows for setting `ServiceAccountName` and [`Pod` template](./podtemplates.md) for each task. This overrides the `Pod` template set for the entire `Pipeline`. | ||
- [`timeout`](#configuring-a-failure-timeout) - Specifies the timeout before the `PipelineRun` fails. | ||
- [`podTemplate`](#pod-template) - Specifies a [`Pod` template](./podtemplates.md) to use as the basis | ||
for the configuration of the `Pod` that executes each `Task`. | ||
|
@@ -70,7 +71,7 @@ A `PipelineRun` definition supports the following fields: | |
|
||
### Specifying the target `Pipeline` | ||
|
||
You must specify the target `Pipeline` that you want the `PipelineRun` to execute, either by referencing | ||
You must specify the target `Pipeline` that you want the `PipelineRun` to execute, either by referencing | ||
an existing `Pipeline` definition, or embedding a `Pipeline` definition directly in the `PipelineRun`. | ||
|
||
To specify the target `Pipeline` by reference, use the `pipelineRef` field: | ||
|
@@ -81,22 +82,6 @@ spec: | |
name: mypipeline | ||
|
||
``` | ||
|
||
You may also use a `Tekton Bundle` to reference a pipeline defined remotely. | ||
|
||
```yaml | ||
spec: | ||
pipelineRef: | ||
name: mypipeline | ||
bundle: docker.io/myrepo/mycatalog:v1.0 | ||
``` | ||
|
||
The syntax and caveats are similar to using `Tekton Bundles` for `Task` references | ||
in [Pipelines](pipelines.md#tekton-bundles) or [TaskRuns](taskruns.md#tekton-bundles). | ||
|
||
`Tekton Bundles` may be constructed with any toolsets that produce valid OCI image artifacts | ||
so long as the artifact adheres to the [contract](tekton-bundle-contracts.md). | ||
|
||
To embed a `Pipeline` definition in the `PipelineRun`, use the `pipelineSpec` field: | ||
|
||
```yaml | ||
|
@@ -156,6 +141,27 @@ spec: | |
... | ||
``` | ||
|
||
#### Tekton Bundles | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like we might want to design a page dedicated to alpha features eventually, or at least one that contains a link to all alpha feature docs, but not necessarily in this patch. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we add a link to this new section in the TOC at the top? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done 😉 |
||
|
||
**Note: This is only allowed if `enable-tekton-oci-bundles` is set to | ||
`"true"` in the `feature-flags` configmap, see [`install.md`](./install.md#customizing-the-pipelines-controller-behavior)** | ||
|
||
You may also use a `Tekton Bundle` to reference a pipeline defined remotely. | ||
|
||
```yaml | ||
spec: | ||
pipelineRef: | ||
name: mypipeline | ||
bundle: docker.io/myrepo/mycatalog:v1.0 | ||
``` | ||
|
||
The syntax and caveats are similar to using `Tekton Bundles` for `Task` references | ||
in [Pipelines](pipelines.md#tekton-bundles) or [TaskRuns](taskruns.md#tekton-bundles). | ||
|
||
`Tekton Bundles` may be constructed with any toolsets that produce valid OCI image artifacts | ||
so long as the artifact adheres to the [contract](tekton-bundle-contracts.md). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe udpate the tekton-bundle-contracts file to add it needs to have the feature flag enabled? |
||
|
||
|
||
## Specifying `Resources` | ||
|
||
A `Pipeline` requires [`PipelineResources`](resources.md) to provide inputs and store outputs | ||
|
@@ -223,7 +229,7 @@ to all `persistentVolumeClaims` generated internally. | |
You can specify `Parameters` that you want to pass to the `Pipeline` during execution, | ||
including different values of the same parameter for different `Tasks` in the `Pipeline`. | ||
|
||
**Note:** You must specify all the `Parameters` that the `Pipeline` expects. Parameters | ||
**Note:** You must specify all the `Parameters` that the `Pipeline` expects. Parameters | ||
that have default values specified in Pipeline are not required to be provided by PipelineRun. | ||
|
||
For example: | ||
|
@@ -236,14 +242,14 @@ spec: | |
- name: pl-param-y | ||
value: "500" | ||
``` | ||
You can pass in extra `Parameters` if needed depending on your use cases. An example use | ||
case is when your CI system autogenerates `PipelineRuns` and it has `Parameters` it wants to | ||
provide to all `PipelineRuns`. Because you can pass in extra `Parameters`, you don't have to | ||
You can pass in extra `Parameters` if needed depending on your use cases. An example use | ||
case is when your CI system autogenerates `PipelineRuns` and it has `Parameters` it wants to | ||
provide to all `PipelineRuns`. Because you can pass in extra `Parameters`, you don't have to | ||
go through the complexity of checking each `Pipeline` and providing only the required params. | ||
|
||
### Specifying custom `ServiceAccount` credentials | ||
|
||
You can execute the `Pipeline` in your `PipelineRun` with a specific set of credentials by | ||
You can execute the `Pipeline` in your `PipelineRun` with a specific set of credentials by | ||
specifying a `ServiceAccount` object name in the `serviceAccountName` field in your `PipelineRun` | ||
definition. If you do not explicitly specify this, the `TaskRuns` created by your `PipelineRun` | ||
will execute with the credentials specified in the `configmap-defaults` `ConfigMap`. If this | ||
|
@@ -256,7 +262,7 @@ For more information, see [`ServiceAccount`](auth.md). | |
|
||
If you require more granularity in specifying execution credentials, use the `serviceAccountNames` field to | ||
map a specific `serviceAccountName` value to a specific `Task` in the `Pipeline`. This overrides the global | ||
`serviceAccountName` you may have set for the `Pipeline` as described in the previous section. | ||
`serviceAccountName` you may have set for the `Pipeline` as described in the previous section. | ||
|
||
For example, if you specify these mappings: | ||
|
||
|
@@ -358,7 +364,7 @@ spec: | |
disktype: ssd | ||
``` | ||
|
||
If used with this `Pipeline`, `build-task` will use the task specific `PodTemplate` (where `nodeSelector` has `disktype` equal to `ssd`). | ||
If used with this `Pipeline`, `build-task` will use the task specific `PodTemplate` (where `nodeSelector` has `disktype` equal to `ssd`). | ||
|
||
### Specifying `Workspaces` | ||
|
||
|
@@ -474,7 +480,7 @@ When a `PipelineRun` changes status, [events](events.md#pipelineruns) are trigge | |
|
||
When a `PipelineRun` has `Tasks` with [WhenExpressions](pipelines.md#guard-task-execution-using-whenexpressions): | ||
- If the `WhenExpressions` evaluate to `true`, the `Task` is executed then the `TaskRun` and its resolved `WhenExpressions` will be listed in the `Task Runs` section of the `status` of the `PipelineRun`. | ||
- If the `WhenExpressions` evaluate to `false`, the `Task` is skipped then its name and its resolved `WhenExpressions` will be listed in the `Skipped Tasks` section of the `status` of the `PipelineRun`. | ||
- If the `WhenExpressions` evaluate to `false`, the `Task` is skipped then its name and its resolved `WhenExpressions` will be listed in the `Skipped Tasks` section of the `status` of the `PipelineRun`. | ||
|
||
```yaml | ||
Conditions: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: "Specifying Tekton Bundles" 😆