github.com/solo-io/cue@v0.4.7/doc/tutorial/kubernetes/quick/services/mon/alertmanager/configmap.cue (about)

     1  package kube
     2  
     3  import yaml656e63 "encoding/yaml"
     4  
     5  configMap: alertmanager: {
     6  	apiVersion: "v1"
     7  	kind:       "ConfigMap"
     8  	data: {
     9  		"alerts.yaml": yaml656e63.Marshal(_cue_alerts_yaml)
    10  		let _cue_alerts_yaml = {
    11  			receivers: [{
    12  				name: "pager"
    13  				// email_configs:
    14  				// - to: 'team-X+alerts-critical@example.org'
    15  				slack_configs: [{
    16  					channel: "#cloudmon"
    17  					text: """
    18  						{{ range .Alerts }}{{ .Annotations.description }}
    19  						{{ end }}
    20  						"""
    21  					send_resolved: true
    22  				}]
    23  			}]
    24  
    25  			// The root route on which each incoming alert enters.
    26  			route: {
    27  				receiver: "pager"
    28  
    29  				// The labels by which incoming alerts are grouped together. For example,
    30  				// multiple alerts coming in for cluster=A and alertname=LatencyHigh would
    31  				// be batched into a single group.
    32  				group_by: ["alertname", "cluster"]
    33  			}
    34  		}
    35  	}
    36  }