Skip to content

fix(controller): use TLS for recycle writes - #888

Open
RedZapdos123 wants to merge 1 commit into
openkruise:masterfrom
RedZapdos123:fix-controller-recycle-runtime-tls
Open

fix(controller): use TLS for recycle writes#888
RedZapdos123 wants to merge 1 commit into
openkruise:masterfrom
RedZapdos123:fix-controller-recycle-runtime-tls

Conversation

@RedZapdos123

@RedZapdos123 RedZapdos123 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Description:

Thread runtime TLS through recycle CSI reset signal writes.

Before this change, ensureCSIResetSignal called WriteFileWithRuntime without the transport resolved by runtime.TransportOptionsFor. As a result, a sandbox advertising the runtime TLS capability was silently downgraded to plaintext during recycle.

This PR keeps the legacy plaintext behavior for non-TLS sandboxes but binds the controller's existing RuntimeTLSBundle into the recycle reset signal write path and adds regression tests for the missing-bundle and configured-bundle paths.

Validation Tests run:

  • go test ./pkg/controller/sandbox/core -run 'TestEnsureCSIResetSignal|TestNewCommonControl_ForwardsRuntimeTLSBundle' -count=1
  • go test ./pkg/controller/sandbox/core -count=1
  • go test ./pkg/controller/sandbox/... -count=1

Notes:

Thread runtime TLS through recycle reset-signal writes so TLS-stamped sandboxes do not fall back to plaintext during CSI reset handling.

Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>
@kruise-bot
kruise-bot requested review from furykerry and zmberg August 27, 2026 10:33
@kruise-bot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign zmberg for approval by writing /assign @zmberg in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.31%. Comparing base (3d45fb4) to head (798d593).
⚠️ Report is 22 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #888      +/-   ##
==========================================
- Coverage   82.48%   82.31%   -0.17%     
==========================================
  Files         248      249       +1     
  Lines       20416    20705     +289     
==========================================
+ Hits        16840    17044     +204     
- Misses       2927     2991      +64     
- Partials      649      670      +21     
Flag Coverage Δ
unittests 82.31% <100.00%> (-0.17%) ⬇️

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.

@kruise-bot

Copy link
Copy Markdown

@RedZapdos123: PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants