Skip to content

fix(sharding): enable shared TLS for sharding - #10770

Merged
leon-ape merged 11 commits into
release-1.1from
bugfix/10756-shared-tls-release-1.1
Aug 13, 2026
Merged

fix(sharding): enable shared TLS for sharding#10770
leon-ape merged 11 commits into
release-1.1from
bugfix/10756-shared-tls-release-1.1

Conversation

@leon-ape

Copy link
Copy Markdown
Collaborator

What changed

This is the release-1.1 backport of #10767.

  • register the shared sharding TLS transformer in the Cluster reconciliation chain
  • honor each active shard template's effective ShardingDefinition.spec.tls.shared
  • rewrite only expanded shard Component specs that enable shared TLS
  • use fixed internal source keys while preserving optional ComponentDefinition TLS file declarations
  • adapt the shared TLS tests to the release-1.1 test layout and CRD API-version compatibility checks

Why

ShardingDefinition.spec.tls.shared is accepted by the API, but the transformer was not registered, so shards received independently generated certificate authorities.

Fixes #10756

Validation

  • scripts/codex-go-test.sh ./controllers/apps/cluster -count=1
  • scripts/codex-go-test.sh ./controllers/apps/component -count=1

Known follow-ups

  • DNS SANs for actual shard service names are not addressed by this backport.
  • Cleanup and certificate rotation when leaving shared TLS are intentionally left to a separate lifecycle change.

@leon-ape leon-ape added the nopick Not auto cherry-pick when PR merged label Aug 12, 2026
@github-actions github-actions Bot added the size/XL Denotes a PR that changes 500-999 lines. label Aug 12, 2026
@apecloud-bot

Copy link
Copy Markdown
Collaborator

Auto Cherry-pick Instructions

Usage:
  - /nopick: Not auto cherry-pick when PR merged.
  - /pick: release-x.x [release-x.x]: Auto cherry-pick to the specified branch when PR merged.

Example:
  - /nopick
  - /pick release-1.1

CLA Recheck Instructions

Usage:
  - /recheck-cla: Trigger a re-check of CLA status for this pull request.
Example:
  - /recheck-cla

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.28302% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.33%. Comparing base (b0941eb) to head (c4efe31).

Files with missing lines Patch % Lines
...s/apps/cluster/transformer_cluster_sharding_tls.go 94.68% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           release-1.1   #10770      +/-   ##
===============================================
+ Coverage        53.99%   54.33%   +0.34%     
===============================================
  Files              545      545              
  Lines            61305    61364      +59     
===============================================
+ Hits             33103    33345     +242     
+ Misses           25004    24835     -169     
+ Partials          3198     3184      -14     
Flag Coverage Δ
unittests 54.33% <95.28%> (+0.34%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@leon-ape leon-ape changed the title [release-1.1] fix: enable shared TLS for sharding fix: enable shared TLS for sharding Aug 13, 2026
@leon-ape
leon-ape marked this pull request as ready for review August 13, 2026 02:31
@leon-ape
leon-ape requested a review from a team as a code owner August 13, 2026 02:31
Comment thread controllers/apps/cluster/transformer_cluster_sharding_tls.go Outdated
Comment thread controllers/apps/cluster/transformer_cluster_sharding_tls.go
@leon-ape leon-ape changed the title fix: enable shared TLS for sharding fix(sharding): enable shared TLS for sharding Aug 13, 2026
Comment thread controllers/apps/cluster/cluster_controller.go
Comment thread controllers/apps/cluster/cluster_controller_test.go
@leon-ape

Copy link
Copy Markdown
Collaborator Author

/approve

@apecloud-bot apecloud-bot added the approved PR Approved Test label Aug 13, 2026
@apecloud-bot apecloud-bot removed the approved PR Approved Test label Aug 13, 2026
@leon-ape

Copy link
Copy Markdown
Collaborator Author

/approve

@apecloud-bot apecloud-bot added the approved PR Approved Test label Aug 13, 2026
@leon-ape
leon-ape merged commit dbf783b into release-1.1 Aug 13, 2026
36 checks passed
@leon-ape
leon-ape deleted the bugfix/10756-shared-tls-release-1.1 branch August 13, 2026 04:13
@github-actions github-actions Bot added this to the Release 1.2.0 milestone Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved PR Approved Test nopick Not auto cherry-pick when PR merged size/XL Denotes a PR that changes 500-999 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sharding + TLS: each shard gets its own self-signed CA, so peer TLS between shards can never validate

2 participants