apiVersion: v1
kind: ConfigMap
metadata:
  name: k8eraid-config
  namespace: kube-system
data:
  config.json: |
    {
    	"deployments": [
    		{
    			"name": "heapster",
    			"filter": "kube-system",
    			"alerterType": "smtp",
    			"alerterName": "example-email",
    			"reportStatus": {
    				"minReplicas": 1,
    				"pendingThreshold": 1
    			}
    		},
    		{
    			"name": "kube-dns",
    			"filter": "kube-system",
    			"alerterType": "smtp",
    			"alerterName": "example-email",
    			"reportStatus": {
    				"minReplicas": 1,
    				"pendingThreshold": 1
    			}
    		}
    	],
    	"pods": [
    		{
    			"name": "*",
    			"filterNamespace": "kube-system",
    			"filterLabel": "",
    			"alerterType": "smtp",
    			"alerterName": "example-email",
    			"reportStatus": {
    				"minPods": 1,
    				"podRestarts": true,
    				"failedScheduling": true,
    				"stuckTerminating": true,
    				"pendingThreshold": 1
    			}
    		}
    	],
    	"daemonsets": [
    		{
    			"name": "nginx-ingress-controller",
    			"filter": "kube-system",
    			"alerterType": "smtp",
    			"alerterName": "example-email",
    			"reportStatus": {
    				"checkReplicas": true,
    				"failedScheduling": true,
    				"pendingThreshold": 1
    			}
    		}
    	],
    	"nodes": [
    		{
    			"name": "*",
    			"filter": null,
    			"alerterType": "smtp",
    			"alerterName": "example-email",
    			"reportStatus": {
    				"pendingThreshold": 60,
    				"minNodes": 3,
    				"outOfDisk": true,
    				"memoryPressure": true,
    				"diskPressure": true,
    				"readiness": true
    			}
    		}
    	],
    	"alerters": {
    		"smtp": [
    			{
    				"name": "example-email",
    				"toAddress": "kubernetes@example.net",
    				"fromAddress": "kubernetes@example.net",
    				"mailServer": "relay.example.com",
    				"port": 25,
    				"subject": "Observed issue with Kubernetes cluster"
    			}
    		]
    	}
    }
