-
Bug
-
Resolution: Unresolved
-
Major
-
Pipelines 1.21.0
-
False
-
-
False
-
Known Issue
-
Proposed
-
-
-
Description of problem:
tektonpruner not pruning pipelineRuns with updated values in tekton-pruner-namespace-spec configmap
Prerequisites (if any, like setup, operators/versions):
Install OSP 1.21.0
Steps to Reproduce
- Create new project test-ns-cm
- Create the tekton-pruner-namespace-spec configmap in test-ns-cm
apiVersion: v1
kind: ConfigMap
metadata:
name: tekton-pruner-namespace-spec # Fixed name
namespace: test-ns-cm # User namespace only
labels:
app.kubernetes.io/part-of: tekton-pruner
pruner.tekton.dev/config-type: namespace
data:
ns-config: |
ttlSecondsAfterFinished: 3000
failedHistoryLimit: 7
historyLimit: null
successfulHistoryLimit: 8
- Create few pipelineRuns in above namespace and validate the number of successful & failed pipelineRuns matches the configmap values
successfulHistoryLimit -> 8 pipelineRuns
failedHistoryLimit -> 7 pipelineRuns
$ opc pr ls NAME STARTED DURATION STATUS tkn-version-run 1 minute ago 9s Succeeded tkn-run-2 1 minute ago 9s Succeeded tkn-pac-run-2 1 minute ago 10s Succeeded skopeo-copy-run 1 minute ago 15s Succeeded pull-request-pipeline-run 1 minute ago 8s Failed opc-task-run 1 minute ago 21s Succeeded openshift-client-run 1 minute ago 9s Succeeded nodejs-ex-git-pr 1 minute ago 1m1s Failed kn-apply-run 1 minute ago 1s Failed(CouldntGetTask) maven-run2 1 minute ago 1m0s Failed(PipelineRunTimeout) kn-run 1 minute ago 2s Failed(CouldntGetTask) kn-pz-run 1 minute ago 0s Failed(CouldntGetTask) jib-maven-run 1 minute ago 50s Failed helm-upgrade-from-repo-run 1 minute ago 12s Succeeded helm-upgrade-from-source-run 1 minute ago 32s Succeeded
[08:16:15] smanthin@smanthin-thinkpadp16vgen1:~/Test/1_21/pruner/ns-config$ opc pr ls NAME STARTED DURATION STATUS tkn-version-run 5 minutes ago 9s Succeeded tkn-run-2 5 minutes ago 9s Succeeded tkn-pac-run-2 5 minutes ago 10s Succeeded skopeo-copy-run 5 minutes ago 15s Succeeded pull-request-pipeline-run 5 minutes ago 8s Failed opc-task-run 5 minutes ago 21s Succeeded openshift-client-run 5 minutes ago 9s Succeeded nodejs-ex-git-pr 5 minutes ago 1m1s Failed kn-apply-run 5 minutes ago 1s Failed(CouldntGetTask) maven-run2 5 minutes ago 1m0s Failed(PipelineRunTimeout) kn-run 5 minutes ago 2s Failed(CouldntGetTask) kn-pz-run 5 minutes ago 0s Failed(CouldntGetTask) jib-maven-run 5 minutes ago 50s Failed helm-upgrade-from-repo-run 5 minutes ago 12s Succeeded helm-upgrade-from-source-run 5 minutes ago 32s Succeeded Now lower the values of all the fields in configmap such as TTL, successful & failed PRs limit. Updated TTl to 300 secs(5 mins), successful PRs to 3 & failed PRs to 4 $ cat test-ns-cm.yaml apiVersion: v1 kind: ConfigMap metadata: name: tekton-pruner-namespace-spec # Fixed name namespace: test-ns-cm # User namespace only labels: app.kubernetes.io/part-of: tekton-pruner pruner.tekton.dev/config-type: namespace data: ns-config: | ttlSecondsAfterFinished: 300 failedHistoryLimit: 4 historyLimit: null successfulHistoryLimit: 3 Even with ttlSecondsAfterFinished set to 5 minuntes, the pipelineRuns are not getting pruned. $ opc pr ls NAME STARTED DURATION STATUS tkn-version-run 9 minutes ago 9s Succeeded tkn-run-2 9 minutes ago 9s Succeeded tkn-pac-run-2 9 minutes ago 10s Succeeded skopeo-copy-run 9 minutes ago 15s Succeeded pull-request-pipeline-run 9 minutes ago 8s Failed opc-task-run 9 minutes ago 21s Succeeded openshift-client-run 9 minutes ago 9s Succeeded nodejs-ex-git-pr 9 minutes ago 1m1s Failed kn-apply-run 9 minutes ago 1s Failed(CouldntGetTask) maven-run2 9 minutes ago 1m0s Failed(PipelineRunTimeout) kn-run 9 minutes ago 2s Failed(CouldntGetTask) kn-pz-run 9 minutes ago 0s Failed(CouldntGetTask) jib-maven-run 9 minutes ago 50s Failed helm-upgrade-from-repo-run 9 minutes ago 12s Succeeded helm-upgrade-from-source-run 9 minutes ago 32s Succeeded
Actual results:
tektonpruner not pruning pipelineRuns with updated values in tekton-pruner-namespace-spec configmap
Expected results:
pipelineRuns should be pruned based on the updated values in tekton-pruner-namespace-spec configmap
Reproducibility (Always/Intermittent/Only Once):
Always
Acceptance criteria:
Definition of Done:
Build Details:
Additional info (Such as Logs, Screenshots, etc):
PFA logs for reference
tektonconfig.yaml![]()
tekton-pruner-controller-logs.log![]()
tekton-pruner-webhook-logs.log![]()
test-ns-cm.yaml![]()
*
- is incorporated by
-
SRVKP-9346 Event Based Pruner Post GA Priorities
-
- New
-
- is related to
-
SRVKP-7743 Event Based Pruner - GA
-
- In Progress
-
- links to