feat(kubernetes): add security context options to sandbox#2050
Open
iuin8 wants to merge 1 commit into
Open
Conversation
63de71a to
1c1f01c
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
330e5b9 to
fd23edb
Compare
fd23edb to
0c6ebd8
Compare
AgentScopeJavaBot
approved these changes
Jul 12, 2026
AgentScopeJavaBot
left a comment
Collaborator
There was a problem hiding this comment.
🤖 AI Review
Adds Pod/Container-level SecurityContext to Kubernetes sandbox. Clean implementation following existing patterns. 3 tests cover all paths. Minor: document immutability contract for SecurityContext in copy().
| @@ -183,6 +189,8 @@ private static KubernetesSandboxClientOptions copy(KubernetesSandboxClientOption | |||
| o.setContainerName(src.getContainerName()); | |||
Collaborator
There was a problem hiding this comment.
[minor] copy() does shallow copy of SecurityContext. Document immutability contract since modifying defaultOptions after construction affects all sandboxes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
containerSecurityContextandpodSecurityContextoptions to the Kubernetes sandbox client options.nullby default.KubernetesSandboxClient#createmerge/copy paths.Tests
mvn -f pom.xml -pl agentscope-extensions/agentscope-extensions-sandbox/agentscope-extensions-sandbox-kubernetes -am -Dtest=Fabric8KubernetesPodRuntimeTest test