-
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.
TEP 0127: Larger results using sidecar logs: validation, documentatio…
…n and example tests 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
e55c0da
commit 35a6a2e
Showing
11 changed files
with
282 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
76 changes: 76 additions & 0 deletions
76
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,76 @@ | ||
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: Task | ||
metadata: | ||
name: print-large-results | ||
spec: | ||
params: | ||
- name: param1 | ||
- name: param2 | ||
- name: param3 | ||
- name: param4 | ||
- name: param5 | ||
steps: | ||
- name: step1 | ||
image: alpine | ||
script: | | ||
echo "$(params.param1)"; | ||
echo "$(params.param2)"; | ||
echo "$(params.param3)"; | ||
echo "$(params.param4)"; | ||
echo "$(params.param5)"; | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Pipeline | ||
metadata: | ||
name: large-result-pipeline | ||
spec: | ||
tasks: | ||
- name: large-task | ||
taskRef: | ||
name: large-result-task | ||
- name: print-results | ||
params: | ||
- name: param1 | ||
value: "$(tasks.large-task.results.result1)" | ||
- name: param2 | ||
value: "$(tasks.large-task.results.result2)" | ||
- name: param3 | ||
value: "$(tasks.large-task.results.result3)" | ||
- name: param4 | ||
value: "$(tasks.large-task.results.result4)" | ||
- name: param5 | ||
value: "$(tasks.large-task.results.result5)" | ||
taskRef: | ||
name: print-large-results | ||
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
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
Oops, something went wrong.