Repository navigation
Conversation
Failure-Class: none
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks @aryanorastar — this is a genuinely useful fix. Suppressing the three managed-GKE control-plane *Down critical alerts is the right call, and the regression test in test_monitoring_alert_rule_contract.py is a nice touch that will prevent regressions. Issue #9138 is clearly addressed.
One small change request before merge.
defaultRules.disabled is redundant and slightly risky
I checked the vendored kube-prometheus-stack chart (backend/charts/deepgram-self-hosted/nova-3/charts/kube-prometheus-stack, v60.5.0). Each of the three PrometheusRule groups is gated at the file level by its component flag, e.g. in kubernetes-system-kube-proxy.yaml:
{{- if and ... .Values.defaultRules.create .Values.kubeProxy.enabled .Values.defaultRules.rules.kubeProxy }}
Setting kubeProxy.enabled: false (and likewise for kubeScheduler / kubeControllerManager) already prevents the entire KubeProxyDown / KubeSchedulerDown / KubeControllerManagerDown PrometheusRule from being rendered. So the defaultRules.disabled block doesn't suppress anything that enabled: false doesn't already suppress.
The mild risk: if the cluster ever moves to a self-managed control plane and someone flips kubeControllerManager.enabled: true (your own PR body notes these values "must be revisited" in that case), the leftover KubeControllerManagerDown: true would silently keep that alert off and could hide a real control-plane outage.
Suggested fix
Drop the defaultRules.disabled block and rely solely on the component enabled: false flags — then the alerts automatically come back when (and only when) the component is re-enabled. The test would then just assert the three enabled: false flags.
## GKE manages the Kubernetes control plane; these customer-cluster scrape
## targets do not exist and their default "down" alerts would page forever.
kubeProxy:
enabled: false
kubeScheduler:
enabled: false
kubeControllerManager:
enabled: falseNo blocker on the core direction — flagging for human maintainer review given this touches prod alert routing.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
… plane (BasedHardware#9138) Co-authored-by: Cursor <[email protected]>
|
@Git-on-my-level addressed — dropped the redundant Regression test now asserts those three flags are false and that the three |
kodjima33
left a comment
There was a problem hiding this comment.
Correct root cause (GKE-managed control plane targets never expose kube-proxy/scheduler/controller-manager), minimal chart fix, contract test added, CI green.
) ## Summary - Repo-enforceable slice of [#9587](#9587): declare expected prod scrape targets in `backend/charts/monitoring/expected-targets.prod.yaml`. - Static contract tests assert values/ServiceMonitor wiring, token scrape auth, `omi-journey-scrape-missing` coverage for enforced jobs, Telegram receiver + `instatus_component` labels, and scrape-health `noDataState`. - Wire `backend/charts/monitoring/**` contract sources into unit-test selection so inventory/values drift is caught on PRs. - Complements [#9138](#9138) / [#11093](#11093) via documented managed-GKE exclusions — does **not** duplicate control-plane alert disables. - Explicitly deferred: live Instatus/Telegram delivery tests, notification-policy rework, expanding scrape-missing to Parakeet/GPU/Stackdriver/ksm, backend-sync Cloud Run scrape path. ## Test plan - [x] `pytest tests/unit/test_monitoring_telemetry_contract.py` - [x] `pytest tests/unit/test_workflow_contracts.py::test_selector_docs_and_flat_utils_do_not_force_full_suite_via_globs` - [ ] Confirm PR CI selects the monitoring contracts when inventory/values change Failure-Class: none
Summary
Fixes #9138.
The production kube-prometheus-stack values enabled scrapes for kube-proxy,
kube-scheduler, and kube-controller-manager. Those control-plane targets are
managed by GKE and are not exposed to this customer cluster, so the default
*Downrules became permanently false-positive after their 15-minute window.The production values now set those three component scrapes to
enabled: false.In kube-prometheus-stack that alone gates the corresponding PrometheusRule
groups, so the invalid pages stop without a separate
defaultRules.disabledblock (which would silently keep the alerts off if the components are later
re-enabled on a self-managed control plane). Application alerts,
TargetDown,and
PrometheusRuleFailuresare unchanged.Verification
python3 -m pytest backend/tests/unit/test_monitoring_alert_rule_contract.py backend/tests/unit/test_logging_config.py -qhelm template prod backend/charts/deepgram-self-hosted/nova-3/charts/kube-prometheus-stack -f backend/charts/monitoring/kube-prometheus-stack/prod_omi_monitoring_values.yaml*Downalert rules rendered zero times.Risk
This intentionally stops collecting these managed control-plane metrics in the
production chart. If the monitoring deployment moves to a self-managed control
plane, flip the three
enabledflags (and the alerts return with them).Invariants
No product invariants are affected.
Failure-Class: none