← Back to Pull requests

docs: issue the mTLS quick-start certificate for the name the operator verifies #772

Open
unknown opened this pull request with 486 lines diff across 6 files
View on GitHub
unknown unknown commented on Dec 02, 2026 19:21 UTC
Author

This PR closes #771.

Summary

The mTLS quick start issued its server certificate for a different name from the one the operator verifies. With networking.tls.serverName unset, the operator verifies the headless Service name, valkey-<cluster>.<namespace>.svc.<clusterDomain> (see TLS in docs/valkeycluster.md). With the doc's certificate every handshake to a node failed, so the cluster never formed. The page has read this way since it was added in 0f06979 (#242).

 # docs/mtls.md, server Certificate
-  commonName: valkeycluster-mtls.default.svc.cluster.local
-  dnsNames: [ valkeycluster-mtls.default.svc.cluster.local ]
+  commonName: valkey-valkeycluster-mtls.default.svc.cluster.local
+  dnsNames: [ valkey-valkeycluster-mtls.default.svc.cluster.local ]

  • docs/mtls.md: the server certificate and the valkey-cli -h example now use the Service's DNS name. After the cert-manager example, a new paragraph says the server certificate's dnsNames must include serverName, or its default when it is unset. The "Operator-managed connections" section no longer calls the server certificate's CN the node FQDN.

  • docs/valkeycluster.md: the TLS section says the server certificate must list that name, and the TLS tip says its wildcard SAN does not cover the name itself, which fails the same way.

  • docs/using-modules.md: the kubectl exec example now names the pod the operator creates, valkey-my-cluster-0-0-0.
  • Features / Behaviour Changes

    None. It's docs only, so nothing rolls on upgrade.

    Implementation

    The names now match what the e2e TLS specs already issue and dial. The two mTLS specs also add localhost to the server certificate; the plain TLS spec runs the exporter with only the Service name and passes, so the quick start leaves localhost out.

    Limitations

    I haven't applied the quick start to a cluster.

    Testing

  • I used a scratch test, not committed. It reads the YAML blocks in docs/mtls.md and builds the operator's TLS config with nodeTLSFromCluster and getTLSConfig. Then it dials a local TLS server that presents a certificate with the doc's names and requires a client certificate, as clientAuth.mode: Required does. On main the handshake fails with x509: certificate is valid for valkeycluster-mtls.default.svc.cluster.local, not valkey-valkeycluster-mtls.default.svc.cluster.local. With this change it succeeds. The same test compares the -h host with headlessServiceFQDN and the using-modules.md pod with the StatefulSet pod name from valkeyNodeResourceName. Both differ on main and match here.

  • TestTLSServerName and TestNodeTLSFromCluster pin the default name the doc now uses. They pass with or without this change, since no code changed.

  • make lint, make test and hack/check-copyright.sh pass locally. No Go code, manifest or chart changed.

  • Unverified until CI runs: e2e. I didn't run kind validation. The closest e2e specs passed in the security job of the main e2e run at f9959bf. The CN mTLS spec issues the server certificate for valkey-<cluster>.default.svc.cluster.local and connects valkey-cli with a client certificate to that name. The clientAuth.ca spec runs mode: Required without a default user, as the quick start does.
  • Checklist

    Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one issue.

  • Commit message explains what changed and why

  • Tests are added or updated. Not needed, since it's docs only. The scratch test above checked the change.

  • Documentation files are updated.

  • I have run pre-commit locally (pre-commit run --all-files or hooks on commit). pre-commit isn't installed here. For a docs-only change only its merge-conflict check applies, and git diff --check is clean.
  • Diff: 486 lines (+364 / -122) across 6 files Reviewer: coderabbitai[bot] Review duration: 11m
    All Vouch review confidence checks passed
    Residual risk 0.38 = Change Risk (0.71) × (1 − Review Confidence (0.46)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.71 · 486 lines diff across 6 files
    0.71
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 96% · Reviewer familiarity: 35%
    45%
    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.370
    Shallow Review Depth shallow_review_depth
    0.344
    Sensitive Paths sensitive_paths
    0.071
    Real PR Conversation Timeline
    1 comments
    "Review active on #772"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: medium confidence: 45.8% 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: 70.5% (HIGH) · Higher = larger blast radius
    70.5%
    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: 45.8% · Lower = rushed or shallow review
    45.8%
    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: 38.2% · Moderate risk
    38.2%