INNER CODE UNIT · Go
err
grafana/grafana-operator · controllers/alertrulegroup_controller.go:360
_, err = gClient.Provisioning.PostAlertRule(params) //nolint:errcheck
if err != nil {
return fmt.Errorf("creating rule: %w", err)
}
}
}
// Update whole group and all existing rules at once
// Will delete rules not present in the body
params := provisioning.NewPutAlertRuleGroupParams().
WithBody(mGroup).
WithGroup(mGroup.Title).
WithFolderUID(folderUID).
WithXDisableProvenance(disableProvenance)
_, err = gClient.Provisioning.PutAlertRuleGroup(params) //nolint:errcheck
if err != nil {
return fmt.Errorf("updating alert rule group: %s", err.Error())