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

k8s-stack: check notifier.blackhole flag if no notifiers are set in vmalert #1518

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

AndrewChubatiuk
Copy link
Contributor

@AndrewChubatiuk AndrewChubatiuk commented Sep 19, 2024

@github-actions github-actions bot added the k8s-stack k8s-stack helm chart related issue label Sep 19, 2024
Comment on lines 259 to 261
{{- if not (or (hasKey $spec "notifier") (hasKey $spec "notifiers") (hasKey $spec "notifierConfigRef")) }}
{{- fail "`notifier`, `notifiers` or `notifierConfigRef` should be set for vmalert"}}
{{- end }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wdyt about enforcing user to set notifier.blackhole if there are no other notifiers set?
This allows to make sure that user explicitly wants to blackhole all notifications and did not forget to set notifier by acccident.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated PR

@AndrewChubatiuk AndrewChubatiuk changed the title k8s-stack: allow running vmalert without notifiers configured k8s-stack: force setting notifier.blackhole if no notifiers are set Sep 19, 2024
zekker6
zekker6 previously approved these changes Sep 19, 2024
Copy link
Contributor

@zekker6 zekker6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

See a suggestion for a changelog entry, it should make it easier to understand for the end users.

@@ -3,6 +3,7 @@
- Added VMAuth to k8s stack. See [this issue](https://github.com/VictoriaMetrics/helm-charts/issues/829)
- Fixed ETCD dashboard
- Use path prefix from args as a default path prefix for ingress. Related [issue](https://github.com/VictoriaMetrics/helm-charts/issues/1260)
- Force setting blackhole notifier if no notifiers are set
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Force setting blackhole notifier if no notifiers are set
- Allow using vmalert without notifiers configuration. Note that it is required to use `.vmalert.spec.extraArgs["notifiers.blackhole"]: true` in order to start vmalert with a blackhole configuration.

@AndrewChubatiuk
Copy link
Contributor Author

updated error in helm and changelog, please approve again

@Haleygo Haleygo changed the title k8s-stack: force setting notifier.blackhole if no notifiers are set k8s-stack: check notifier.blackhole flag if no notifiers are set in vmalert Sep 20, 2024
@Haleygo Haleygo merged commit e6b116b into master Sep 20, 2024
8 checks passed
@Haleygo Haleygo deleted the allow-no-notifiers branch September 20, 2024 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
k8s-stack k8s-stack helm chart related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants