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

Create example Alerts for when a Gateway or HTTPRoute is not protected by Kuadrant Polices #440

Closed
david-martin opened this issue Feb 27, 2024 · 1 comment · Fixed by #514
Assignees

Comments

@david-martin
Copy link
Contributor

These will be based on the absence of specific Policies targeting a HTTPRoute or Gateway.

  • Alert if a Gateway does not have a DNSPolicy targeting it
  • Alert if a Gateway does not have a TLSPolicy targeting it
  • Alert if a HTTPRoute does not have an AuthPolicy targeting it
  • Alert if a HTTPRoute does not have a RateLimitPolicy targeting it

These alerts will need to depend on metrics exported by https://github.com/Kuadrant/gateway-api-state-metrics/tree/main

Changes may be needed to expose the relationship (targetRef) information as state metrics so that the alert query can be written

@david-martin
Copy link
Contributor Author

example alert query

label_replace(gatewayapi_gateway_info, "gateway_name", "$1", "name", "(.*)")

unless 

(label_replace(gatewayapi_gateway_info, "gateway_name", "$1", "name", "(.*)")
* on(gateway_name) group_left
label_replace(gatewayapi_dnspolicy_target_info{target_kind="Gateway"}, "gateway_name", "$1", "target_name", "(.*)"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
2 participants