Skip to content

Commit

Permalink
feat(prod/jenkins): add cronjob to monitor s3 codecache size (#1319)
Browse files Browse the repository at this point in the history
Add cronjob to monitor s3 code cache size.

---------

Co-authored-by: wuhuizuo <[email protected]>
  • Loading branch information
purelind and wuhuizuo authored Nov 8, 2024
1 parent 99760c0 commit 3893b58
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions apps/prod/jenkins/pre/cronjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,41 @@ spec:
limits:
memory: "512Mi"
cpu: "500m"
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: fix-ci-code-cache-size
namespace: apps
spec:
schedule: "*/30 * * * *"
jobTemplate:
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: deno
image: "denoland/deno:2.0.5"
tty: true
args:
- run
- --allow-net
- --allow-env
- https://github.com/PingCAP-QE/ci/raw/main/scripts/plugins/monitor-s3-object-size.ts
- --path="git/PingCAP-QE/tidb-test"
- --threshold-mb=2500
- --feishu-webhook="${CI_MONITOR_FEISHU_WEBHOOK_URL}"
- --cleanup
envFrom:
- secretRef:
name: ci-pipeline-cache2
- configMapRef:
name: s3-ci-pipeline-cache2
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "500m"

0 comments on commit 3893b58

Please sign in to comment.