Skip to content

Commit ef9b914

Browse files
authored
Merge pull request #80048 from eromanova97/RHDEVDOCS-5983
RHDEVDOCS-5983: DOC: Records/Logs retention configuration in Tekton R…
2 parents ffa3864 + 0f54046 commit ef9b914

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// This module is included in the following assembly:
2+
//
3+
// * cicd/pipelines/using-tekton-results-for-openshift-pipelines-observability.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="configuring-retention-policy-results_{context}"]
7+
= Configuring the retention policy for {tekton-results}
8+
9+
By default, {tekton-results} stores pipeline runs, task runs, events, and logs indefinitely. This leads to an unnecesary use of storage resources and can affect your database performance.
10+
11+
You can configure the retention policy for {tekton-results} at the cluster level to remove older results and their associated records and logs. You can achieve this by editing the `TektonResult` custom resource (CR).
12+
13+
.Prerequisites
14+
15+
* You installed {tekton-results}.
16+
17+
.Procedure
18+
19+
* In the `TektonResult` CR, configure the retention policy for {tekton-results}, as shown in the following example:
20+
+
21+
.Example retention policy for {tekton-results}
22+
[source,yaml]
23+
----
24+
apiVersion: operator.tekton.dev/v1alpha1
25+
kind: TektonResult
26+
metadata:
27+
name: result
28+
spec:
29+
options:
30+
configMaps:
31+
config-results-retention-policy:
32+
data:
33+
runAt: "3 5 * * 0" #<1>
34+
maxRetention: "30" #<2>
35+
----
36+
<1> Specify, in cron format, when to run the pruning job in the database. This example runs the job at 5:03 AM every Sunday.
37+
<2> Specify how many days to keep the data in the database. This example retains the data for 30 days.

records/using-tekton-results-for-openshift-pipelines-observability.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ include::modules/op-results-cert.adoc[leveloffset=+2]
2323
include::modules/op-results-db.adoc[leveloffset=+2]
2424
include::modules/op-results-storage.adoc[leveloffset=+2]
2525

26-
26+
//Install and configure Tekton Results
2727
include::modules/op-installing-results.adoc[leveloffset=+1]
28+
include::modules/op-configuring-retention-policy-results.adoc[leveloffset=+1]
2829

2930
[id="querying-using-opc_using-tekton-results-for-openshift-pipelines-observability"]
3031
== Querying {tekton-results} using the opc command line utility

0 commit comments

Comments
 (0)