-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adds pagerduty as an endpoint #781 #787
base: main
Are you sure you want to change the base?
Conversation
Thanks for your contribution, I will try to take a Look on your PR this Week |
b17bb87
to
5b55497
Compare
I'll need to make some additional changes, but wanted to get an idea of if this is a good direction so far. |
pkg/target/pagerduty/pagerduty.go
Outdated
|
||
// Create a unique key for tracking incidents | ||
func incidentKey(result v1alpha2.PolicyReportResult) string { | ||
key := result.Policy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you might want to add the rule as well. One policy can have multiple rules which fail against one resource.
pkg/target/pagerduty/pagerduty.go
Outdated
} | ||
|
||
// Store the incident ID for later resolution | ||
p.incidents.Store(key, resp.Id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when the pod restarts or you run it in a HA setup? This approach not working really.
You also missing the case when a Policy or Resource is deleted. Then the result is just removed from the report.
Signed-off-by: B Pearson <[email protected]>
51dd6c6
to
d909403
Compare
for multiple clusters Signed-off-by: B Pearson <[email protected]>
d909403
to
e1ba6a6
Compare
No description provided.