diff --git a/k8s/stage/osh-client-tekton/tekton-cleanup-cronjob.yaml b/k8s/stage/osh-client-tekton/tekton-cleanup-cronjob.yaml new file mode 100644 index 0000000..0b1833a --- /dev/null +++ b/k8s/stage/osh-client-tekton/tekton-cleanup-cronjob.yaml @@ -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 diff --git a/k8s/stage/osh-client-tekton/tekton-prune.yaml b/k8s/stage/osh-client-tekton/tekton-prune.yaml deleted file mode 100644 index d448b70..0000000 --- a/k8s/stage/osh-client-tekton/tekton-prune.yaml +++ /dev/null @@ -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"