I am trying to delete the alerts from my GKE cluster which is deployed with a file provisioning template. below is my yaml to delete multiple alerts at a time with respective UID's. But I get " error: X failure to parse file provider. yaml : yaml: unmarshal errors:". Any suggestions on how to delete multiple uids? or even delete the alert folder? If I provide the uid as below it works
Working yaml:
provider.yaml: |-
apiVersion: 1
deleteRules:
- orgsId: 1
uid: hssksks222
But when I provide the yaml as below it gives the error: X failure to parse file provider.yaml : yaml: unmarshal errors:" Non working yaml
apiVersion: v1
kind: ConfigMap
metadata:
labels:
helm.sh/chart: grafana-6.9.0
app.kubernetes.io/name: grafana
app.kubernetes.io/instance: pro-grafana
app.kubernetes.io/version: "7.5."
name: grafana-alerting
namespace: grafana-monitoring
data:
provider.yaml: |-
apiVersion: 1
deleteRules:
- orgsId: 1
uid:
- hssksks222
- gjdjdu244ss
This works for me.