Skip to content

Commit d703f09

Browse files
authored
Merge pull request #52847 from sounix000/4541-add-default-prunner-settings
RHDEVDOCS-4541: Adding default prunner configuration
2 parents 0d91891 + 3efcfea commit d703f09

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

cicd/pipelines/automatic-pruning-taskrun-pipelinerun.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ Stale `TaskRun` and `PipelineRun` objects and their executed instances occupy ph
1414
* Configuring automatic pruning by specifying annotations affects the entire namespace. You cannot selectively auto-prune individual task runs and pipeline runs in a namespace.
1515
====
1616

17+
include::modules/op-default-pruner-configuration.adoc[leveloffset=+1]
18+
1719
include::modules/op-annotations-for-automatic-pruning-taskruns-pipelineruns.adoc[leveloffset=+1 ]
1820

1921
[id="additional-resources_automatic-pruning-taskrun-pipelinerun"]
2022
== Additional resources
2123

22-
* For information on manual pruning of various objects, see xref:../../applications/pruning-objects.adoc#prunning-objects[Pruning objects to reclaim resources].
24+
* For information on manual pruning of various objects, see xref:../../applications/pruning-objects.adoc#pruning-objects[Pruning objects to reclaim resources].

modules/op-annotations-for-automatic-pruning-taskruns-pipelineruns.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[id="annotations-for-automatic-pruning-taskruns-pipelineruns_{context}"]
77
= Annotations for automatically pruning task runs and pipeline runs
88

9-
To automatically prune task runs and pipeline runs in a namespace, you can set the following annotations in the namespace:
9+
To automatically prune the resources associated with task runs and pipeline runs in a namespace, you can set the following annotations in the namespace:
1010

1111
* `operator.tekton.dev/prune.schedule`: If the value of this annotation is different from the value specified in the `TektonConfig` custom resource definition, a new cron job in that namespace is created.
1212
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// This module is included in the following assembly:
2+
//
3+
// cicd/pipelines/automatic-pruning-taskrun-pipelinerun.adoc
4+
5+
:_content-type: REFERENCE
6+
[id="default-pruner-configuration_{context}"]
7+
= Default pruner configuration
8+
9+
The default configuration for periodic pruning of resources associated with pipeline runs is as follows:
10+
11+
[source,yaml]
12+
----
13+
apiVersion: operator.tekton.dev/v1alpha1
14+
kind: TektonConfig
15+
metadata:
16+
name: config
17+
...
18+
spec:
19+
pruner:
20+
keep: 100
21+
resources:
22+
- pipelinerun
23+
schedule: 0 8 * * *
24+
...
25+
----
26+
27+
You can override the default pruner configuration for a namespace by using annotations on namespace.

0 commit comments

Comments
 (0)