I'm trying to setup the SLO period window to 7d following the documentation https://sloth.dev/usage/slo-period-windows/
image: ghcr.io/slok/sloth:v0.11.0
When using helm (values.yaml) with and without customSloconfig enable:
sloth:
defaultSloPeriod: 7d # The slo period used by sloth (e.g. 30d).
customSloConfig:
enabled: true
path: /windows
data: {}
It's getting error: AlertWindows.sloth.slok.dev "" not found
Directly with manifest::
apiVersion: sloth.slok.dev/v1
kind: AlertWindows
spec:
sloPeriod: 7d
page:
quick:
errorBudgetPercent: 8
shortWindow: 5m
longWindow: 1h
slow:
errorBudgetPercent: 12.5
shortWindow: 30m
longWindow: 6h
ticket:
quick:
errorBudgetPercent: 20
shortWindow: 2h
longWindow: 1d
slow:
errorBudgetPercent: 42
shortWindow: 6h
longWindow: 3d
kubectl apply -f window.yaml
It's getting error:
error: resource mapping not found for name: "sloth-period-window" namespace: "" from "window.yaml": no matches for kind "AlertWindows" in version "sloth.slok.dev/v1" ensure CRDs are installed first
I tried to create CRD for AlertWindow (alertwindows.sloth.slok.dev) but no success yet. Anyone have the correct CRD for it, if this is the best way to solve it or another help, please?
It is expected that pods work with log:
INFO[0001] Hot-reload triggered from http webhook version=v0.11.0 window=7d