How to modify the execution record (TaskRuns) cleaning strategy for continuous build, pipeline, and artifact promotion?
Background: When using continuous build, pipeline, and artifact promotion in DevOps, in order to avoid the execution records generated by frequent executions causing memory overflow (OOM, Out of Memory) in Katanoni Operator related components, the platform provides a default cleaning strategy: a maximum of 2800 records are retained in the cluster where the Operator is located, and each record is retained for 7 days. The execution records are saved in the etcd of the platform components. You can modify this strategy according to the storage situation of etcd and your need to view the execution records.
Note:
-
The Execution Record mentioned in this article is an internal logic of the function, which is similar to the execution records of continuous build, pipeline, and artifact promotion seen in the interface, but not exactly the same. Except for the modification of the cleaning strategy, there is no need to pay attention to it at other times.
-
Once the execution record cleaning strategy is triggered, some tasks in continuous build may fail. At this time, you can extend the retention time of the execution record, for example, modify it to 240h, which means 10 days.
Procedure
-
In the left navigation bar, click Catalog > Operators.
-
Click the Deployed Operators tab.
-
Click katanomi-operator.
-
In the Resource Instances tab, update the instance of type Katanomi.
You need to switch to the YAML view to operate.
spec: helmValues: global: taskRunPruner: delayAfterCompleted: 168h #Retention per Record 7 days keep: 2800 #Maximum Retention 2800 Execution Records -
Click Update.