0

When I enable the alertmanager a secret gets created with name alertmanager-{chartName}-alertmanager. But no pods or statefulset of alertmanager gets created.

When I delete this secret with kubectl delete and upgrade the chart again, then new secrets get created alertmanager-{chartName}-alertmanager , alertmanager-{chartName}-alertmanager-generated. In this case i can see the pods and statefulset of alertmanager. But the -generated secret has default values which are null. This secret alertmanager-{chartName}-alertmanager has updated configuration.

Checked the alertmanager.yml with amtool and it shows valid.

Chart - kube-prometheus-stack-36.2.0

#Configuration in my values.yaml

alertmanager:
  enabled: true
  global:
    resolve_timeout: 5m
    smtp_require_tls: false
  route:
    receiver: 'email'
  receivers:
    - name: 'null'
    - name: 'email'
      email_configs:
        - to: xyz@gmail.com
          from: abc@gmail.com
          smarthost: x.x.x.x:25
          send_resolved: true
#Configuration from the secret alertmanager-{chartName}-alertmanager

global:
  resolve_timeout: 5m
  smtp_require_tls: false
inhibit_rules:
- equal:
  - namespace
  - alertname
  source_matchers:
  - severity = critical
  target_matchers:
  - severity =~ warning|info
- equal:
  - namespace
  - alertname
  source_matchers:
  - severity = warning
  target_matchers:
  - severity = info
- equal:
  - namespace
  source_matchers:
  - alertname = InfoInhibitor
  target_matchers:
  - severity = info
receivers:
- name: "null"
- email_configs:
  - from: abc@gmail.com
    send_resolved: true
    smarthost: x.x.x.x:25
    to: xyz@gmail.com
  name: email
route:
  group_by:
  - namespace
  group_interval: 5m
  group_wait: 30s
  receiver: email
  repeat_interval: 12h
  routes:
  - matchers:
    - alertname =~ "InfoInhibitor|Watchdog"
    receiver: "null"
templates:
- /etc/alertmanager/config/*.tmpl
Sahit
  • 470
  • 6
  • 15

0 Answers0