Skip to content

Commit

Permalink
task: add cronjobs
Browse files Browse the repository at this point in the history
  • Loading branch information
o11yguru committed Mar 4, 2024
1 parent 6aeb162 commit 331be70
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 0 deletions.
28 changes: 28 additions & 0 deletions jobs/cronjob-logs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: telemetrygen-logs
spec:
# Change this to the frequency you desire -- currently it's set to 5 minutes
schedule: "*/1 * * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
jobTemplate:
spec:
template:
spec:
containers:
- name: telemetrygen
image: public.ecr.aws/p3k6k6h3/telemetrygen:current
imagePullPolicy: IfNotPresent
args:
- "logs"
- "--otlp-endpoint"
- "10.244.0.8:4318"
- "--otlp-insecure"
- "true"
- "--otlp-http"
- "--logs"
- "50"
restartPolicy: OnFailure
27 changes: 27 additions & 0 deletions jobs/cronjob-metrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: telemetrygen-metrics
spec:
schedule: "*/1 * * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
jobTemplate:
spec:
template:
spec:
containers:
- name: telemetrygen
image: public.ecr.aws/p3k6k6h3/telemetrygen:current
imagePullPolicy: IfNotPresent
args:
- "metrics"
- "--otlp-endpoint"
- "test-collector-collector:4318"
- "--otlp-insecure"
- "true"
- "--otlp-http"
- "--duration"
- "1s"
restartPolicy: OnFailure
27 changes: 27 additions & 0 deletions jobs/cronjob-traces.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: telemetrygen-traces
spec:
schedule: "*/5 * * * *"
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
jobTemplate:
spec:
template:
spec:
containers:
- name: telemetrygen
image: public.ecr.aws/p3k6k6h3/telemetrygen:current
imagePullPolicy: IfNotPresent
args:
- "traces"
- "--otlp-endpoint"
- "test-collector-collector:4318"
- "--otlp-insecure"
- "true"
- "--otlp-http"
- "--duration"
- "1s"
restartPolicy: OnFailure

0 comments on commit 331be70

Please sign in to comment.