Have next issue:
When try to set up alertmanager configuration over CRD, get wrong configuration on pod.
Problem look like:
- routing_key: |
*****
routing_key parameter after all CD use multiline string type, and it crash configuration - alertmanager don't understand it as pagerduty config and don't use default template for custom configuration. It not made expected json for PD and PD send back status code 400.
Expected configuration look like:
- routing_key: ****
But it only, if I use CRD. If I set up it without CRD (in global values) it worked fine.
More information:
config.yaml:
route:
groupBy: ['alertname', 'namespace']
groupWait: 10s
groupInterval: 30s
repeatInterval: 30m
receiver: 'pagerDuty'
continue: true
receivers:
- name: 'pagerDuty'
pagerdutyConfigs:
- url: 'https://events.eu.pagerduty.com/v2/enqueue'
routingKey: { name: name_of_secret, key: ke_of_secret }
Helm chart temlate for build it to CRD:
{{- $files := .Files.Glob "alerting/**/config.yaml" }}
{{- if $files }}
{{- range $path, $fileContents := $files }}
---
{{- $namespace := regexReplaceAll "^.*/(.*?)/.*" $path "${1}"}}
apiVersion: monitoring.coreos.com/v1alpha1
kind: AlertmanagerConfig
metadata:
name: {{ printf "%s-%s" $namespace "alertmanager-config" }}
namespace: {{ $namespace }}
spec: {{ $.Files.Get $path | nindent 2}}
{{- end }}
{{- end }}
After it go to ArgoCD and sync with wrong type routing_key.
Try it with v1 API(uses service_key), same problem.
Anyone have same problem? How fix it? Try a lot, but think - it a bug.