apiVersion: v1
kind: ConfigMap
metadata:
  name: calert-configmap
  labels:
    app: calert
data:
  config.toml: |
    # All timeouts and durations are in milliseconds.
    
    [server]
    address = ":6000"
    socket = "/tmp/calert.sock"
    name = "calert"
    
    # WARNING If these timeouts are less than 1s,
    # the server connection breaks.
    read_timeout=5000
    write_timeout=5000
    keepalive_timeout=300000
    
    [app]
    template_file = "/etc/calert/message.tmpl"
    max_size = 4000
    
    [app.http_client]
    max_idle_conns =  100
    request_timeout = 8000
    
    [app.chat.alertManagerTestRoom]
    notification_url = "https://chat.googleapis.com/v1/spaces/xxx/messages?key=abc-xyz&token=token-unique-key%3D"
    
    [app.chat.awesomeRoomTwo]
    notification_url = "https://chat.googleapis.com/v1/spaces/xxx/messages?key=abc-xyz&token=token-unique-key%3D"

  message.tmpl: |
    *{{ .Labels.alertname | Title }} - {{.Status | Title }} ({{.Labels.severity | toUpper }})*
    {{ range .Annotations.SortedPairs -}}
    {{ .Name }}: {{ .Value}}
    {{ end -}}          
