Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

resnostyle
Copy link

No description provided.

@fjogeleit
Copy link
Member

Thanks for your contribution, I will try to take a Look on your PR this Week

@resnostyle resnostyle force-pushed the add-pagerduty-support branch from b17bb87 to 5b55497 Compare February 26, 2025 02:09
@resnostyle
Copy link
Author

I'll need to make some additional changes, but wanted to get an idea of if this is a good direction so far.


// Create a unique key for tracking incidents
func incidentKey(result v1alpha2.PolicyReportResult) string {
key := result.Policy
Copy link
Member

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.

}

// Store the incident ID for later resolution
p.incidents.Store(key, resp.Id)
Copy link
Member

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.

@resnostyle resnostyle force-pushed the add-pagerduty-support branch from 51dd6c6 to d909403 Compare March 1, 2025 13:00
@resnostyle resnostyle force-pushed the add-pagerduty-support branch from d909403 to e1ba6a6 Compare March 1, 2025 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants