Browse Source
todo: * Service account/secret to access tekton resources * Tune - I dont know what happens if you clean up taskruns only for example35-pssaas-kerberos-bypass
2 changed files with 21 additions and 8 deletions
@ -0,0 +1,21 @@
|
||||
apiVersion: batch/v1 |
||||
kind: CronJob |
||||
metadata: |
||||
name: tekton-terminator |
||||
namespace: pct-security-tooling |
||||
spec: |
||||
schedule: "*/10 * * * *" |
||||
concurrencyPolicy: Forbid |
||||
jobTemplate: |
||||
spec: |
||||
template: |
||||
spec: |
||||
containers: |
||||
- name: tekton-cleanup |
||||
image: quay.io/openshift-pipeline/openshift-pipelines-cli-tkn:1.11 |
||||
imagePullPolicy: IfNotPresent |
||||
command: |
||||
- /bin/sh |
||||
- -c |
||||
- tkn pipelinerun delete --keep 10 && tkn taskrun delete --keep 20 |
||||
restartPolicy: OnFailure |
||||
@ -1,8 +0,0 @@
|
||||
apiVersion: v1 |
||||
kind: Namespace |
||||
metadata: |
||||
name: pct-security-tooling |
||||
annotations: |
||||
operator.tekton.dev/prune.resource: taskrun, pipelinerun |
||||
operator.tekton.dev/prune.schedule: '*/10 * * * *' |
||||
operator.tekton.dev/prune.strategy.keep: "10" |
||||
Loading…
Reference in new issue