Alerting: Add file provisioning for notification policies (#52877)

This commit is contained in:
Jean-Philippe Quéméner
2022-08-01 19:14:57 +02:00
committed by GitHub
parent d9cace4dca
commit eab6365cf7
9 changed files with 172 additions and 16 deletions

View File

@@ -272,12 +272,15 @@ func (ps *ProvisioningServiceImpl) ProvisionAlerting(ctx context.Context) error
ps.log)
contactPointService := provisioning.NewContactPointService(&st, ps.secretService,
st, ps.SQLStore, ps.log)
notificationPolicyService := provisioning.NewNotificationPolicyService(&st,
st, ps.SQLStore, ps.Cfg.UnifiedAlerting, ps.log)
cfg := prov_alerting.ProvisionerConfig{
Path: alertingPath,
RuleService: *ruleService,
DashboardService: ps.dashboardService,
DashboardProvService: ps.dashboardProvisioningService,
ContactPointService: *contactPointService,
Path: alertingPath,
RuleService: *ruleService,
DashboardService: ps.dashboardService,
DashboardProvService: ps.dashboardProvisioningService,
ContactPointService: *contactPointService,
NotificiationPolicyService: *notificationPolicyService,
}
return ps.provisionAlerting(ctx, cfg)
}