Skip to content

Conversation

@Horiodino
Copy link
Contributor

Description:
added validation to ensure hostPath is part of a configured mount. if the path is not mounted, an error is returned.

Testing:
added unit tests for isMounted

Signed-off-by: Praful Khanduri <holiodin@gmail.com>
@Horiodino Horiodino force-pushed the hostPath_mount_validation branch from 75f0a14 to 84ff74e Compare December 1, 2025 10:01
}
// TODO: make sure that hostPath is mounted
if !ts.isMounted(hostPath) {
return "", fmt.Errorf("path %q is not mounted", hostPath)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Callers such as ListDirectory and ReadFile have to handle this case.

Probably it should fall back to the guest path, with an annotation in the tool result to indicate how the path was resolved.

Signed-off-by: Praful Khanduri <holiodin@gmail.com>
@Horiodino Horiodino force-pushed the hostPath_mount_validation branch from 84ff74e to c44939c Compare December 1, 2025 12:25
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.

2 participants