fix(tls): fail closed when TLS profile watcher cannot register #176
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.62) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.62 · 264 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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
Diff Size
diff_size
0.334
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.062
Real PR Conversation Timeline
1 comments
"Review active on #176"
general
weight: 0.35
RobuRishabh
Purpose of this PR
If
ProfileWatcher.SetupWithManagerfails, the operator previously logged a warning and kept running. Cluster TLS profile changes then never trigger a restart, so the process can serve with a stale profile.This matches the fail-closed pattern used by opendatahub-operator, mlflow-operator, and DSPO.
Follow-up to #156.
Proposed changes:
SetupProfileWatcherRestartnow returns an error when watcher registration fails (and cancels the context)os.Exit(1)on that error so kubelet restarts the processChange Category
Rationale
Log-and-continue on watcher registration is inconsistent with the org TLS contract: if the watcher never starts, the operator cannot honor cluster TLS profile changes.
Checklist
Additional Notes
go test ./pkg/tls/...andgo build ./cmd/operator/...pass locallyMade with Cursor
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
Bug Fixes
Improved startup reliability for the operator controller and webhook.
TLS security profile watcher setup failures are now detected and reported immediately.
Components stop startup when the TLS watcher cannot be initialized, preventing operation with an invalid or unavailable security context.
TLS settings are now consistently applied to REST-based submissions.
Failed watcher initialization no longer leaves components running with a partially configured security context.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->