mirror of
https://github.com/immich-app/devtools.git
synced 2026-09-30 13:23:00 +08:00
60 lines
2.4 KiB
YAML
60 lines
2.4 KiB
YAML
---
|
|
# One-off vmalert replay Job to backfill recording rule history, applied once
|
|
# by flux (ks.yaml: data-pipeline-vmetrics-replay). Once it has completed and
|
|
# the rule series validate against the raw queries, remove this directory and
|
|
# the data-pipeline-vmetrics-replay Kustomization in a follow-up PR — prune
|
|
# will delete the Job and ConfigMap.
|
|
#
|
|
# The data vmsingle keeps 50y of raw samples, so unlike the monitoring replay
|
|
# this one covers the full history from the first ingested sample (Feb 2022).
|
|
# Once the rules are replayed the vmsingle rollup result cache is reset so
|
|
# queries immediately see the backfilled samples.
|
|
#
|
|
# Jobs are immutable; the force annotation makes flux delete+recreate (and
|
|
# therefore re-run the replay) if this spec is ever changed.
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: data-pipeline-replay
|
|
namespace: data
|
|
annotations:
|
|
kustomize.toolkit.fluxcd.io/force: enabled
|
|
spec:
|
|
backoffLimit: 0
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: data-pipeline-replay
|
|
spec:
|
|
restartPolicy: Never
|
|
initContainers:
|
|
- name: replay
|
|
# Pinned to chart 0.91.2's vmalert version (Chart.yaml appVersion v1.150.0).
|
|
image: victoriametrics/vmalert:v1.150.0@sha256:c6e6c1ef6e43c09510dd0aff264bf0ea319c1bdfced1ccc79dad1545950a7989
|
|
args:
|
|
- -rule=/rules/rules.yaml
|
|
- -datasource.url=http://vmsingle-vmetrics-data:8428
|
|
- -remoteWrite.url=http://vmsingle-vmetrics-data:8428
|
|
- -replay.timeFrom=2022-02-01T00:00:00Z
|
|
- -replay.disableProgressBar=true
|
|
# 100 hourly points per query_range = ~4 days of raw data per
|
|
# request; measured at ~0.15s each against the live instance.
|
|
- -replay.maxDatapointsPerQuery=100
|
|
# vmsingle runs with -search.maxConcurrentRequests=2, so replay
|
|
# queries can be rejected while the site is being queried.
|
|
- -replay.ruleRetryAttempts=10
|
|
volumeMounts:
|
|
- name: rules
|
|
mountPath: /rules
|
|
readOnly: true
|
|
containers:
|
|
- name: reset-rollup-cache
|
|
image: curlimages/curl:8.21.0@sha256:7c12af72ceb38b7432ab85e1a265cff6ae58e06f95539d539b654f2cfa64bb13
|
|
args:
|
|
- -sf
|
|
- http://vmsingle-vmetrics-data:8428/internal/resetRollupResultCache
|
|
volumes:
|
|
- name: rules
|
|
configMap:
|
|
name: data-pipeline-replay-rules
|