feat(alertmanager): support to set templates in alertmanagerConfiguration
Description
As disscussed at https://github.com/prometheus-operator/prometheus-operator/issues/4606, this pr support to set templates in alertmanagerConfiguration.
It will looks like:
apiVersion: monitoring.coreos.com/v1
kind: Alertmanager
metadata:
name: main
spec:
alertmanagerConfiguration:
name: main
global:
...
templates:
- secret:
name: template1
key: template1.tmpl
- configmap:
name: template2
key: template2.tmpl
Type of change
What type of changes does your code introduce to the Prometheus operator? Put an x in the box that apply.
- [ ]
CHANGE(fix or feature that would cause existing functionality to not work as expected) - [x]
FEATURE(non-breaking change which adds functionality) - [ ]
BUGFIX(non-breaking change which fixes an issue) - [ ]
ENHANCEMENT(non-breaking change which improves existing functionality) - [ ]
NONE(if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)
Changelog entry
feat(alertmanager): support to set templates in alertmanagerConfiguration.
A better approach might be mount the template secrets/configmaps in the Alertmanager container directly.
That might be ok. Let me have a try.
@simonpasquier pushed again, I add unit-test, e2e test, then test in my local environment, it seems ok 😆
thanks!
Hi @simonpasquier Has this been released yet?
yes in v0.60.0 but for some reason it wasn't mentioned in the changelog.