fix(chart): verify the metrics certificate when a TLS secret is set #538
All Vouch review confidence checks passed
Residual risk 0.34 = Change Risk (0.63) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.63 · 302 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.342
Sensitive Paths
sensitive_paths
0.063
Real PR Conversation Timeline
1 comments
"Review active on #538"
general
weight: 0.35
ricky-rav
/kind bug
What this PR does / why we need it:
The ServiceMonitor defaults to
tlsConfig.insecureSkipVerify: true. That is needed for the self-signed certificate generated whentls.metricsTLSSecretis empty, but it also means that a certificate provided throughtls.metricsTLSSecretis never verified.prometheus.serviceMonitor.tlsConfigchanges frominsecureSkipVerify: trueto{}, and the template setsinsecureSkipVerify: trueonly whentls.metricsTLSSecretis empty: an install with default values renders the same ServiceMonitor as beforeca/serverNamego inprometheus.serviceMonitor.tlsConfiginsecureSkipVerifyis always honoredtlsConfigis empty, since the scrapes fail in that casehelm template| | Before | After |
|---|---|---|
|
values.yamldefault |tlsConfig: {insecureSkipVerify: true}|tlsConfig: {}|| No secret, nothing else set | skip verify | skip verify (unchanged) |
| Secret set, nothing else set | skip verify | verify |
Release note:
``
release-notetls.metricsTLSSecretHelm chart: the ServiceMonitor skips the verification of the metrics certificate only when
is empty. Action required: releases that settls.metricsTLSSecretand relied on the default must setcaandserverNameinprometheus.serviceMonitor.tlsConfig, or an explicitinsecureSkipVerify: true.
`<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
ServiceMonitor TLS settings are applied consistently to both metrics endpoints and support custom CA certificates and server names.
Without a metrics TLS secret, certificate verification is disabled by default. With a secret, Prometheus uses its default verification behavior unless configured otherwise. Explicit true
orfalsevalues are respected;null` keeps verification enabled.Helm warns when a TLS secret is configured without verification settings and recommends configuring a CA and server name.
Documentation
Clarified TLS defaults and noted that unverified self-signed certificates are intended for development and testing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->