Skip to content

guest/spec: remove VirtualPod path helpers and dead code#2736

Open
shreyanshjain7174 wants to merge 1 commit into
microsoft:mainfrom
shreyanshjain7174:guest-cleanup-virtual-pod
Open

guest/spec: remove VirtualPod path helpers and dead code#2736
shreyanshjain7174 wants to merge 1 commit into
microsoft:mainfrom
shreyanshjain7174:guest-cleanup-virtual-pod

Conversation

@shreyanshjain7174
Copy link
Copy Markdown
Contributor

Follow-up to #2699: removes the VirtualPod-specific path helpers from internal/guest/spec/spec.go that became dead code after the pod-unification refactor.

Context

After #2699, all callers of pod paths use the *FromRoot(sandboxRoot) variants from #2653. The 13 Get*VirtualPod* / VirtualPodAware* helpers in spec.go are no longer reachable from any production path, and SandboxLogsDir / SandboxLogPath were only used by VirtualPodAwareSandboxRootDir.

Changes

  • Drop 13 VirtualPod path functions from internal/guest/spec/spec.go.
  • Drop SandboxLogsDir and SandboxLogPath.
  • Update ExtendPolicyWithNetworkingMounts in pkg/securitypolicy to take sandboxRoot string and use the FromRoot variant.

Stats

4 files changed, 21 insertions(+), 167 deletions(-).

Depends on #2699.

Remove 13 VirtualPod-specific path functions from spec.go that are no
longer called after the pod unification. All callers now use the
*FromRoot variants added in microsoft#2653.

Also removes SandboxLogsDir and SandboxLogPath — both were only
reachable through VirtualPodAwareSandboxRootDir which is now gone.

Updates ExtendPolicyWithNetworkingMounts in pkg/securitypolicy to
accept a sandboxRoot string and use the FromRoot variant.

Signed-off-by: Shreyansh Sancheti <shsancheti@microsoft.com>
@shreyanshjain7174 shreyanshjain7174 force-pushed the guest-cleanup-virtual-pod branch from e7b5238 to ab47712 Compare May 13, 2026 09:32
@rawahars
Copy link
Copy Markdown
Contributor

@anmaxvl Can you check once as well since there is a change to one of the methods used in confidential workflow.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants