← Back to Pull requests

Support ClusterTrustBundle CA references in BackendTLSPolicy and frontend validation #1726

Open
codebot-robot opened this pull request with 1286 lines diff across 16 files
View on GitHub
codebot-robot codebot-robot commented on Dec 03, 2026 03:51 UTC
Author

Support certificates.k8s.io/ClusterTrustBundle CA certificate references in BackendTLSPolicy (spec.validation.caCertificateRefs) and Gateway frontend TLS validation (spec.tls.frontend.*.validation.caCertificateRefs).

Changes


  • Resolve ClusterTrustBundle (certificates.k8s.io) CA references in BackendTLSPolicy (routes, ext_proc, and policy status) and Gateway frontend TLS validation, reading spec.trustBundle PEM through the same validation and data-plane paths used for ConfigMap CA bundles.

  • Watch ClusterTrustBundle resources in controller setup (preferring certificates.k8s.io/v1 and falling back to certificates.k8s.io/v1beta1), triggering reconciliation on add/update/delete.

  • Gracefully handle clusters that do not serve the ClusterTrustBundle API: the controller starts and reconciles normally, while references to a ClusterTrustBundle fail with InvalidCACertificateRef / NoValidCACertificate and a clear message stating the API is not served.

  • Move SupportClusterTrustBundle from unsupportedFeatures to SupportedFeatures.

  • Grant get, list, and watch RBAC permissions on certificates.k8s.io/clustertrustbundles in controller manifests.

  • Add unit tests (pkg/state/clustertrustbundle_test.go, pkg/controller/utils_test.go) and envtest integration tests (pkg/gari/clustertrustbundle_test.go) covering live watch/reconciliation and clusters without the ClusterTrustBundle API.
  • Fixes #1023

    Diff: 1286 lines (+1205 / -81) across 16 files Reviewer: justinsb Review duration: 1926m
    All Vouch review confidence checks passed
    Residual risk 0.34 = Change Risk (0.95) × (1 − Review Confidence (0.64)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.95 · 1286 lines diff across 16 files
    0.95
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.35 · 1 substantive comment(s)
    0.35
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    63%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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.400
    Sensitive Paths sensitive_paths
    0.095
    Mass File Touch mass_file_touch
    0.080
    Real PR Conversation Timeline
    2 items
    justinsb justinsb approved these changes on Dec 03, 2026 13:21 UTC
    Approved Reviewer

    (Automatic review)

    Reviewers
    Assignees
    codebot-robot codebot-robot
    Labels
    risk: low confidence: 63.7% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 94.7% (HIGH) · Higher = larger blast radius
    94.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 63.7% · Lower = rushed or shallow review
    63.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 34.3% · Safe to merge
    34.3%