-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[Alertmanager] Alertmanager (standalone chart) - unsure if it supports secrets instead of configmaps for alertmanager.yaml #2971
Comments
For the former, indeed, Prometheus operator supports
Regarding the value Apart from using it for a custom notification template as shown above, as an example, when using opsgenie, one has to specify an api key. This is a secret and hence, one might prefer using
I understand you mean |
Thanks for the detailed response, it's a lot clearer now.
I'll try this today and see if it works for our usecase.
Upon reading it again, it makes perfect sense. Amazing what I night of sleep can do. |
I'm running into the same problem. I'm trying to configure a webhook to send to bigpanda, not directly to slack. Due to the nature of my CICD setup I cannot have another wrapper script that adds injects the secret at helm compile time. I have a secret in the Kubernetes cluster. How do I get alertmanager to read this? The config file supports filepath config for opsgenie/slack etc., but not for a generic webhook? |
That is correct. At the moment, alertmanager supports reading some parameters' values from files. The topic is known in the alertmanager project, see e.g. issues #3108, #2498. |
Thanks - understood. I'll use an alternative method of templating instead then. Namely, external-secrets templating out a Kubernetes secret with the alertmanager config, and then getting alertmanager to read this secret instead (as a full config). Will revert back if that doesn't work. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions. |
I am facing similar issue, I dont know how to workaround it:
It deploys as a secret, but the autocreated gz secret which is mounted into alertmanager pod has not been updated. |
I've faced the same issue as @spcaipers-arm described. Unable to set alertmanager, only default value is loaded. |
I've managed to provide a custom configuration @spcaipers-arm. Please try this:
I added:
Also, you need this:
I hope it will work for you as well! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions. |
This issue is being automatically closed due to inactivity. |
Describe the bug a clear and concise description of what the bug is.
Hi.
I'm trying to setup a separate alertmanager using this helm chart.
We have an existing alertmanager deployed with kube-prometheus-stack, but want to deploy a second alertmanager (so we can keep the alertmanager.yaml configs separate for a second team).
I don't believe this chart supports using a secret for storing the alertmanager.yaml (or at least it isn't explained well).
If it is supported, the templates section within the configmap isn't well described/documented/visualised on the status page
What's your helm version?
3.9.4
What's your kubectl version?
1.23.0
Which chart?
alertmanager
What's the chart version?
0.25.0
What happened?
kube-prometheus-stack alertmanager supports using an existing secret, but it appears that the standalone alertmanager uses a configmap instead.
https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml#L507
As a workaround I had tried loading the secret directly as an "extraSecretMount", and load a template from the /etc/secrets path that it provides.
However, it appears to just load it as a template, but it doesn't make it clear if that template (which contains routes and receivers) is actually active or will be used? I read here: https://prometheus.io/blog/2016/03/03/custom-alertmanager-templates/ but it's still not clear if the alerting config contains the routes and receivers I've added using the secret
What you expected to happen?
I would expect the standalone helm chart to be somewhat similar to the kube-prometheus-stack, or at least be compatible with secrets for storing the alertmanager.yaml.
It contains slack webhooks and pagerduty routing keys, so I would consider those secure values that shouldn't be in a configmap (or at least not stored in git directly)
Using imagePullSecrets on its own does not seem to add the necessary config either
How to reproduce it?
By using the values.yaml I have supplied, along with creating a secret containing alertmanager.yaml
Enter the changed values of values.yaml?
Overview
ALSO LISTED IS THE SECRET WE USE TO STORE THESE VALUES
LISTED BELOW IS THE ALERTMANAGER.YAML LOADED FROM SECRET
Enter the command that you execute and failing/misfunctioning.
No command is failing, I think it's missing functionality for storing alertmanager.yaml in a secret (or docs that explain this better)
Anything else we need to know?
Here is the alertmanager config from the status page
global:
resolve_timeout: 5m
http_config:
follow_redirects: true
enable_http2: true
smtp_hello: localhost
smtp_require_tls: true
pagerduty_url: https://events.pagerduty.com/v2/enqueue
opsgenie_api_url: https://api.opsgenie.com/
wechat_api_url: https://qyapi.weixin.qq.com/cgi-bin/
victorops_api_url: https://alert.victorops.com/integrations/generic/20131114/alert/
telegram_api_url: https://api.telegram.org
webex_api_url: https://webexapis.com/v1/messages
route:
receiver: default-receiver
continue: false
group_wait: 10s
group_interval: 5m
repeat_interval: 3h
receivers:
templates:
alertmanager.yaml is populated and has a global, route and receivers sections - does it override the values shown here?
It doesn't show it on the status page, which I think it should
The text was updated successfully, but these errors were encountered: