prometheus-operator icon indicating copy to clipboard operation
prometheus-operator copied to clipboard

feat(alertmanager): support to set templates in alertmanagerConfiguration

Open jojotong opened this issue 3 years ago • 1 comments

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.

jojotong avatar Jul 25 '22 09:07 jojotong

A better approach might be mount the template secrets/configmaps in the Alertmanager container directly.

That might be ok. Let me have a try.

jojotong avatar Aug 02 '22 05:08 jojotong

@simonpasquier pushed again, I add unit-test, e2e test, then test in my local environment, it seems ok 😆

jojotong avatar Aug 22 '22 08:08 jojotong

thanks!

simonpasquier avatar Sep 02 '22 14:09 simonpasquier

Hi @simonpasquier Has this been released yet?

MeNsaaH avatar Nov 10 '22 02:11 MeNsaaH

yes in v0.60.0 but for some reason it wasn't mentioned in the changelog.

simonpasquier avatar Nov 15 '22 08:11 simonpasquier