You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Creating a custom release of Tekton Pipelines](#creating-a-custom-release-of-tekton-pipelines)
@@ -421,6 +422,7 @@ features](#alpha-features) to be used.
421
422
do both. For more information, see [Configuring usage of `TaskRun` and `Run` embedded statuses](pipelineruns.md#configuring-usage-of-taskrun-and-run-embedded-statuses).
422
423
423
424
- `resource-verification-mode`: Setting this flag to "enforce" will enforce verification of tasks/pipeline. Failing to verify will fail the taskrun/pipelinerun. "warn" will only log the err message and "skip" will skip the whole verification.
425
+
- `results-from`: set this flag to "termination-message" to use the container's termination message to fetch results from. This is the default method of extracting results. Set it to "sidecar-logs" to enable use of a results sidecar logs to extract results instead of termination message.
424
426
425
427
- `enable-provenance-in-status`: set this flag to "true" to enable recording
426
428
the `provenance` field in `TaskRun` and `PipelineRun` status. The `provenance`
@@ -477,6 +479,24 @@ the `feature-flags` ConfigMap alongside your Tekton Pipelines deployment via
477
479
478
480
For beta versions of Tekton CRDs, setting `enable-api-fields` to "beta" is the same as setting it to "stable".
479
481
482
+
## Enabling larger results using sidecar logs
483
+
484
+
**Note**: The maximum size of a Task's results is limited by the container termination message feature of Kubernetes, as results are passed back to the controller via this mechanism. At present, the limit is per task is “4096 bytes”. All results produced by the task share this upper limit.
485
+
486
+
To exceed this limit of 4096 bytes, you can enable larger results using sidecar logs. By enabling this feature, you will have a configurable limit (with a default of 4096 bytes) per result with no restriction on the number of results.
487
+
488
+
**Note**: to enable this feature, you need to grant `get` access to all `pods/log` to the `Tekton pipeline controller`. This means that the tekton pipeline controller has the ability to access the pod logs.
489
+
490
+
1. Create a cluster role and rolebinding by applying the following spec to provide log access to `tekton-pipelines-controller`.
2. Set the `results-from` feature flag to use sidecar logs by setting `results-from: sidecar-logs` in the [configMap](#customizing-the-pipelines-controller-behavior).
497
+
498
+
3. If you want the size per result to be something other than 4096 bytes, you can set the `max-result-size` feature flag in bytes by setting `max-result-size: 8192(whatever you need here)`. **Note:** The value you can set here cannot exceed the size of the CRD limit of 1.5 MB.
499
+
480
500
## Configuring High Availability
481
501
482
502
If you want to run Tekton Pipelines in a way so that webhooks are resiliant against failures and support
-[Larger `Results` using sidecar logs](#larger-results-using-sidecar-logs)
26
27
-[Specifying `Volumes`](#specifying-volumes)
27
28
-[Specifying a `Step` template](#specifying-a-step-template)
28
29
-[Specifying `Sidecars`](#specifying-sidecars)
@@ -835,7 +836,7 @@ This also means that the number of Steps in a Task affects the maximum size of a
835
836
as each Step is implemented as a container in the TaskRun's pod.
836
837
The more containers we have in our pod, *the smaller the allowed size of each container's
837
838
message*, meaning that the **more steps you have in a Task, the smaller the result for each step can be**.
838
-
For example, if you have 10 steps, the size of each step's Result will have a maximum of less than 1KB*.
839
+
For example, if you have 10 steps, the size of each step's Result will have a maximum of less than 1KB.
839
840
840
841
If your `Task` writes a large number of small results, you can work around this limitation
841
842
by writing each result from a separate `Step` so that each `Step` has its own termination message.
@@ -847,6 +848,17 @@ available size will less than 4096 bytes.
847
848
As a general rule-of-thumb, if a result needs to be larger than a kilobyte, you should likely use a
848
849
[`Workspace`](#specifying-workspaces) to store and pass it between `Tasks` within a `Pipeline`.
849
850
851
+
#### Larger `Results` using sidecar logs
852
+
853
+
This is an experimental feature. The `results-from` feature flag must be set to `"sidecar-logs"`](./install.md#enabling-larger-results-using-sidecar-logs).
854
+
855
+
Instead of using termination messages to store results, the taskrun controller injects a sidecar container which monitors the results of all the steps. The sidecar mounts the volume where results of all the steps are stored. As soon as it finds a new result, it logs it to std out. The controller has access to the logs of the sidecar container (Caution: we need you to enable access to [kubernetes pod/logs](./install.md#enabling-larger-results-using-sidecar-logs).
856
+
857
+
This feature allows users to store up to 4 KB per result by default. Because we are not limited by the size of the termination messages, users can have as many results as they require (or until the CRD reaches its limit). If the size of a result exceeds this limit, then the TaskRun will be placed into a failed state with the following message: `Result exceeded the maximum allowed limit.`
858
+
859
+
**Note**: If you require even larger results, you can specify a different upper limit per result by setting `max-result-size` feature flag to your desired size in bytes ([see instructions](./install.md#enabling-larger-results-using-sidecar-logs)). **CAUTION**: the larger you make the size, more likely will the CRD reach its max limit enforced by the `etcd` server leading to bad user experience.
860
+
861
+
850
862
### Specifying `Volumes`
851
863
852
864
Specifies one or more [`Volumes`](https://kubernetes.io/docs/concepts/storage/volumes/) that the `Steps` in your
Copy file name to clipboardexpand all lines: pkg/apis/config/feature_flags.go
+53
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,10 @@ const (
50
50
WarnResourceVerificationMode="warn"
51
51
// SkipResourceVerificationMode is the value used for "resource-verification-mode" when verification is skipped
52
52
SkipResourceVerificationMode="skip"
53
+
// ResultExtractionMethodTerminationMessage is the value used for "results-from" as a way to extract results from tasks using kubernetes termination message.
0 commit comments