prometheus-operator: Alertmanager Config incompatible with Kustomize
Alertmanager is configured by specifying a secret with the name:
alertmanager-<name>
Kustomize and Kubernetes are moving towards creating temporary secrets of the form:
alertmanager-<hash>
and updating these secrets when the md5sum of the file they reference has changed.
It would be nice to be able to specify the alertmanager configuration file name in the alertmanager resource. Something like:
apiVersion: monitoring.coreos.com/v1
kind: Alertmanager
metadata:
name: alertmanager
spec:
alertmanagerConfig: <config-file-name>
This would allow kustomize and other tools to update both the Alertmanager resource and specify new versions of the alertmanager config.
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 3
- Comments: 16 (5 by maintainers)
With #2827 merged, we have alertmanager configs being created by kustomize with the following config (note that we’re using kustomize bundled with kubectl 1.14; newer versions may differ slightly):
You can disable the behavior of appending a suffix to your configmaps/secrets by using generatorOptions. Something like this:
I hope it helps!