nxtgauge-gitops/ops/openobserve-alerts/cronjob.yaml

49 lines
1.6 KiB
YAML

apiVersion: batch/v1
kind: CronJob
metadata:
name: openobserve-alerts-bootstrap
namespace: openobserve
spec:
schedule: "*/15 * * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
backoffLimit: 0
template:
spec:
restartPolicy: Never
containers:
- name: bootstrap
image: registry.nxtgauge.com/docker:28-cli
command: ["sh", "-lc"]
args:
- apk add --no-cache curl jq >/dev/null && /scripts/bootstrap.sh
env:
- name: ORG_ID
value: default
- name: BASE_URL
value: http://o2-openobserve-standalone.openobserve.svc.cluster.local:5080
- name: TELEGRAM_CHAT_ID
valueFrom:
secretKeyRef:
name: openobserve-telegram
key: TELEGRAM_CHAT_ID
- name: ZO_ROOT_USER_EMAIL
valueFrom:
secretKeyRef:
name: o2-openobserve-standalone
key: ZO_ROOT_USER_EMAIL
- name: ZO_ROOT_USER_PASSWORD
valueFrom:
secretKeyRef:
name: o2-openobserve-standalone
key: ZO_ROOT_USER_PASSWORD
volumeMounts:
- name: scripts
mountPath: /scripts
readOnly: true
volumes:
- name: scripts
configMap:
name: openobserve-alerts-bootstrap
defaultMode: 0555