Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmalert sometimes fails to load updated rules #1221

Open
umezawatakeshi opened this issue Jan 17, 2025 · 2 comments
Open

vmalert sometimes fails to load updated rules #1221

umezawatakeshi opened this issue Jan 17, 2025 · 2 comments
Labels
question Further information is requested

Comments

@umezawatakeshi
Copy link
Contributor

When VMRules are added/deleted/updated, the operator populates them and updates ConfigMaps for vmalerts. The config-reloader sidecar detects it and call the reload API for vmalert. However, vmalert sometimes fail to (re)load some rules. Sometimes, some vmalert replicas successfully load rules but other replicas fail. If the reload API is called manually later, vmalert successfully load all the configured rules.

I suspect that config-reloader calls the reload API "too early" and vmalert begins reload operation before kubelet complete writing all rule files to the volume.

As a workaround, it might be nice for config-reloader to delay calling the reload API for several seconds.

@f41gh7
Copy link
Collaborator

f41gh7 commented Jan 17, 2025

Hello,

Yes, it's possible case and default config-reloader image - jimmidyson/configmap-reload:v0.3.0 doesn't provide such feature.

However, it's possible to use alternative config-reloader with the following spec:

kind: VMAlert
spec:
  useVMConfigReloader: true
  configReloaderExtraArgs:
   # change if needed, default value is 3s
    delay-interval: "5s"

https://github.com/VictoriaMetrics/operator/tree/master/cmd/config-reloader

@f41gh7 f41gh7 added the question Further information is requested label Jan 17, 2025
@umezawatakeshi
Copy link
Contributor Author

I see. I will try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants