Skip to content

Commit d42a68c

Browse files
anithapriyanatarajanpramodbindal
authored andcommitted
update default config from pruner
1 parent 3114f0d commit d42a68c

11 files changed

+133
-14
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ Prerequisites:
9797

9898
- Install Pruner
9999
```bash
100-
kubectl apply -f https://raw.githubusercontent.com/openshift-pipelines/tektoncd-pruner/main/release.yaml
100+
export VERSION=0.1.0 #update version as required
101+
kubectl apply -f "https://github.com/openshift-pipelines/tektoncd-pruner/releases/download/v$VERSION/release-v$VERSION.yaml"
101102
```
102103

103104
Verify installation:
@@ -109,7 +110,7 @@ Look for the `tekton-pruner-controller` pod running.
109110

110111
## Configuration
111112

112-
The pruner is configured through a ConfigMap in the `tekton-pipelines` namespace. Here's a basic example:
113+
The pruner is configured through a ConfigMap in the `tekton-pipelines` namespace. By default config includes minimal configuration as per spec [here](https://raw.githubusercontent.com/openshift-pipelines/tektoncd-pruner/refs/heads/main/config/600-tekton-pruner-default-spec.yaml). This can be modified as required. Here's a basic example:
113114

114115
```yaml
115116
apiVersion: v1
@@ -121,9 +122,9 @@ data:
121122
global-config: |
122123
enforcedConfigLevel: global
123124
ttlSecondsAfterFinished: 300 # 5 minutes
124-
successfulHistoryLimit: 3 # Keep last 3 successful runs
125+
successfulHistoryLimit: 3 # Keep last 3 successful runs
125126
failedHistoryLimit: 3 # Keep last 3 failed runs
126-
historyLimit: 5 # When successfulHistoryLimit and failedHistoryLimit are not set, keep last 5 successful runs and last 5 failed runs (applied individually)
127+
historyLimit: 5 # When successfulHistoryLimit and failedHistoryLimit are not set
127128
```
128129

129130
### Namespace-specific Configuration

config/200-clusterrole.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1+
# Copyright 2025 The Tekton Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
---
15+
216
kind: ClusterRole
317
apiVersion: rbac.authorization.k8s.io/v1
418
metadata:

config/200-role.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1+
# Copyright 2025 The Tekton Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
---
15+
216
kind: Role
317
apiVersion: rbac.authorization.k8s.io/v1
418
metadata:

config/200-serviceaccount.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1+
# Copyright 2025 The Tekton Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
---
15+
216
apiVersion: v1
317
kind: ServiceAccount
418
metadata:

config/201-clusterrolebinding.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1+
# Copyright 2025 The Tekton Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
---
15+
216
apiVersion: rbac.authorization.k8s.io/v1
317
kind: ClusterRoleBinding
418
metadata:

config/201-rolebinding.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1+
# Copyright 2025 The Tekton Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
---
15+
216
apiVersion: rbac.authorization.k8s.io/v1
317
kind: RoleBinding
418
metadata:
Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1+
# Copyright 2025 The Tekton Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
---
15+
216
apiVersion: v1
317
kind: ConfigMap
418
metadata:
@@ -7,7 +21,4 @@ metadata:
721
data:
822
global-config: |
923
enforcedConfigLevel: global
10-
ttlSecondsAfterFinished: 300 # 5 minutes
11-
successfulHistoryLimit: 3 # Keep last 3 successful runs
12-
failedHistoryLimit: 3 # Keep last 3 failed runs
13-
historyLimit: 5 # When successfulHistoryLimit and failedHistoryLimit are not set, keep last 5 successful and last 5 failed runs individually
24+
historyLimit: 100

config/config-info.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2021 The Tekton Authors
1+
# Copyright 2025 The Tekton Authors
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -22,9 +22,4 @@ metadata:
2222
app.kubernetes.io/instance: default
2323
app.kubernetes.io/part-of: tektoncd-pruner
2424
data:
25-
# Contains triggers version which can be queried by external
26-
# tools such as CLI. Elevated permissions are already given to
27-
# this ConfigMap such that even if we don't have access to
28-
# other resources in the namespace we still can have access to
29-
# this ConfigMap.
3025
version: "devel"

config/config-logging.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1+
# Copyright 2025 The Tekton Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
---
15+
216
apiVersion: v1
317
kind: ConfigMap
418
metadata:

config/config-observability.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1+
# Copyright 2025 The Tekton Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
---
15+
216
apiVersion: v1
317
kind: ConfigMap
418
metadata:

config/controller.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1+
# Copyright 2025 The Tekton Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
114
---
15+
216
apiVersion: apps/v1
317
kind: Deployment
418
metadata:

0 commit comments

Comments
 (0)