-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prior to this, we were extracting results from tasks via the termination messages which had a limit of only 4 KB per pod. If users had many results then the results would need to become smaller to obey the upper limit of 4 KB. We now run a dedicated sidecar that has access to the results of all the steps. This sidecar prints out the result and its content to stdout. The logs of the sidecar are parsed by the taskrun controller and the results updated instead of termination logs. We set an upper limit on the results to 4KB by default (configurable) and users can have as many such results as needed.
- Loading branch information
1 parent
f9021b1
commit 2e39083
Showing
9 changed files
with
232 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
examples/v1beta1/pipelineruns/alpha/pipelinerun-large-results.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: large-result-task | ||
spec: | ||
results: | ||
- name: result1 | ||
- name: result2 | ||
- name: result3 | ||
- name: result4 | ||
- name: result5 | ||
steps: | ||
- name: step1 | ||
image: alpine | ||
script: | | ||
cat /dev/urandom | head -c 2500 | base64 | tee $(results.result1.path); | ||
cat /dev/urandom | head -c 2500 | base64 | tee $(results.result2.path); | ||
cat /dev/urandom | head -c 2500 | base64 | tee $(results.result3.path); | ||
cat /dev/urandom | head -c 2500 | base64 | tee $(results.result4.path); | ||
cat /dev/urandom | head -c 2500 | base64 | tee $(results.result5.path); | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Pipeline | ||
metadata: | ||
name: large-result-pipeline | ||
spec: | ||
tasks: | ||
- name: large-task | ||
taskRef: | ||
name: large-result-task | ||
results: | ||
- name: large-result | ||
value: $(tasks.large-task.results.result1) | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
name: large-result-pipeline-run | ||
spec: | ||
pipelineRef: | ||
name: large-result-pipeline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: TaskRun | ||
metadata: | ||
generateName: larger-results- | ||
spec: | ||
taskSpec: | ||
description: | | ||
A task that creates results > termination message limit of 4K per pod! | ||
results: | ||
- name: result1 | ||
- name: result2 | ||
- name: result3 | ||
- name: result4 | ||
- name: result5 | ||
steps: | ||
- name: step1 | ||
image: bash:latest | ||
script: | | ||
#!/usr/bin/env bash | ||
cat /dev/urandom | head -c 2500 | base64 | tee /tekton/results/result1 #about 1 K result | ||
cat /dev/urandom | head -c 2500 | base64 | tee /tekton/results/result2 #about 4 K result | ||
- name: step2 | ||
image: bash:latest | ||
script: | | ||
#!/usr/bin/env bash | ||
cat /dev/urandom | head -c 2500 | base64 | tee /tekton/results/result3 #about 1 K result | ||
cat /dev/urandom | head -c 2500 | base64 | tee /tekton/results/result4 #about 4 K result | ||
cat /dev/urandom | head -c 2500 | base64 | tee /tekton/results/result5 #about 4 K result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters