Conversation
…ape-down alert Follow-up from expert review non-blocking observations: - Remove metrics_auth_role, metrics_auth_role_binding, and metrics_reader_role -- these protected the old HTTPS metrics endpoint which was replaced by plain HTTP in the observability PR - Document the `metrics=enabled` namespace label prerequisite on the NetworkPolicy so operators know why Prometheus scrapes are blocked - Add ControllerMetricsDown alert that fires when Prometheus cannot scrape the controller for 5 minutes, ensuring other alerts aren't silently blind Made-with: Cursor
37e9de9 to
c43c99c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #22 addressing non-blocking observations from the expert review:
metrics_auth_role,metrics_auth_role_binding, andmetrics_reader_rolewere scaffolded by kubebuilder for the old HTTPS metrics endpoint (--metrics-secure=true). With metrics now served over plain HTTP, these ClusterRoles/Bindings (TokenReview, SubjectAccessReview permissions) are unused and should be cleaned up.allow-metrics-trafficNetworkPolicy requires the Prometheus namespace to havemetrics=enabledlabel. Added a comment directly in the manifest so operators know to runkubectl label namespace <prometheus-ns> metrics=enabled.ControllerMetricsDownmeta-alert: Fires when Prometheus can't scrape the controller for 5 minutes (up{job=~".*sei-k8s-controller.*"} == 0). This is the "alert on alerts being blind" pattern -- without it, a broken scrape config or NetworkPolicy issue would silently disable all other controller alerts.Test plan
make manifestsstill succeeds (no RBAC drift)ControllerMetricsDownappears in Prometheus alerts UIMade with Cursor