BCDevOps / developer-experience

This repository is used to track all work for the BCGov Platform Services Team (This includes work for: 1. Platform Experience, 2. Developer Experience 3. Platform Operations/OCP 3)
Apache License 2.0
8 stars 17 forks source link

Create Kyverno policy for PrometheusRules #4846

Closed StevenBarre closed 1 month ago

StevenBarre commented 1 month ago

Describe the issue When product teams create custom PrometheusRules objects, they may not set an interval on a group. This can lead to prometheus trying to evaluate those rules/alerts every 30s instead of doing it less often. This can cause undue load on the cluster Prometheus.

What is the Value/Impact? Protect against bad config from teams impacting cluster performance.

What is the plan? How will this get completed? Test a Kyverno policy to set an interval if none is provided. Allow a team to override the default of 5m if they want.

Identify any dependencies None

Definition of done PR in CCM for the new policy

IanKWatts commented 1 month ago

CCM PR: https://github.com/bcgov-c/platform-gitops-gen/pull/881