Skip to content

feat(infra): add configurable CA path for xDS mTLS#8633

Closed
rajatvig wants to merge 3 commits into
envoyproxy:mainfrom
rajatvig:feat/configurable-xds-tls-ca-path
Closed

feat(infra): add configurable CA path for xDS mTLS#8633
rajatvig wants to merge 3 commits into
envoyproxy:mainfrom
rajatvig:feat/configurable-xds-tls-ca-path

Conversation

@rajatvig

@rajatvig rajatvig commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a configurable CA certificate path for xDS mTLS on both the controller and proxy sides. By default, the CA comes from the ca.crt field in the leaf cert secrets. This change allows pointing both sides at a separately managed CA file instead.

Changes

Controller side:

  • New --xds-tls-ca-path CLI flag overrides the default /certs/ca.crt
  • New Helm values xdsTLSCAPath and xdsTLSCABundle to configure the flag and mount a CA ConfigMap

Proxy side:

  • New xdsTLSCAPath field on the EnvoyProxy CRD overrides the CA path in the SDS trusted CA config

Both sides default to the existing behavior when not set.

The controller re-reads the CA file on each TLS handshake via GetConfigForClient.
The proxy picks up CA changes via SDS file watch. No pod restarts required when the CA file is updated.

Testing

  • Unit tests for ConfigMap generation with custom CA path
  • Manually verified on a kind cluster with cert-manager

Relates to: #4891

@rajatvig rajatvig requested a review from a team as a code owner March 31, 2026 22:37
@netlify

netlify Bot commented Mar 31, 2026

Copy link
Copy Markdown

Deploy Preview for cerulean-figolla-1f9435 ready!

Name Link
🔨 Latest commit 4ff5a7f
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/69cfd5b0312f860008c32b0e
😎 Deploy Preview https://deploy-preview-8633--cerulean-figolla-1f9435.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@rajatvig rajatvig changed the title feat(infra): add configurable CA path for xDS mTLS to support non-disruptive CA rotation feat(infra): add configurable CA path for xDS mTLS Mar 31, 2026
@codecov

codecov Bot commented Mar 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.41379% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.50%. Comparing base (6d06f23) to head (4ff5a7f).
⚠️ Report is 192 commits behind head on main.

Files with missing lines Patch % Lines
internal/xds/runner/runner.go 63.63% 7 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8633      +/-   ##
==========================================
- Coverage   74.52%   74.50%   -0.02%     
==========================================
  Files         243      243              
  Lines       38670    38677       +7     
==========================================
  Hits        28817    28817              
- Misses       7862     7867       +5     
- Partials     1991     1993       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Add --xds-tls-ca-path CLI flag for the controller and xdsTLSCAPath
field on the EnvoyProxy CRD to override the default CA certificate
path (/certs/ca.crt) used for xDS mTLS.

This enables non-disruptive CA rotation when using cert-manager with
trust-manager. The default CA path is baked into leaf cert secrets,
which become stale when the CA rotates. By pointing both sides at a
separately managed CA bundle (e.g. a trust-manager ConfigMap), the
existing reload mechanisms (GetConfigForClient and SDS file watch)
pick up the new CA without pod restarts.

Relates to envoyproxy#4891

Signed-off-by: Rajat Vig <[email protected]>
@zirain zirain force-pushed the feat/configurable-xds-tls-ca-path branch from bdefb9f to 40f4d0b Compare April 1, 2026 01:42
@github-actions

github-actions Bot commented May 3, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, when it's ready. Thank you for your contributions!

@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, when it's ready. Thank you for your contributions!

@github-actions github-actions Bot added the stale label Jun 2, 2026
@github-actions github-actions Bot closed this Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant