Skip to content

Enable local volume mounts in func run for ConfigMaps, Secrets, EmptyDirs, and PVCs#3143

Closed
intojhanurag wants to merge 3 commits intoknative:mainfrom
intojhanurag:add-local-volume-support
Closed

Enable local volume mounts in func run for ConfigMaps, Secrets, EmptyDirs, and PVCs#3143
intojhanurag wants to merge 3 commits intoknative:mainfrom
intojhanurag:add-local-volume-support

Conversation

@intojhanurag
Copy link
Copy Markdown
Member

fix: #2940

Changes

  • Updated pkg/docker/runner.go -> newHostConfig() to mount the following volume types:
    • ConfigMap.func/run/configmaps/<name> directory
    • Secret.func/run/secrets/<name> directory
    • EmptyDir → Docker tmpfs
    • PersistentVolumeClaim.func/run/pvcs/<claimName> directory
  • Added warnings for volumes that attempt to map outside of .func to prevent accidental access to sensitive host directories.
  • Preserves existing behavior for port bindings and other container settings.

@knative-prow knative-prow Bot requested review from jrangelramos and nainaz October 24, 2025 05:13
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented Oct 24, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: intojhanurag
Once this PR has been reviewed and has the lgtm label, please assign dprotaso for approval. For more information see the 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

@knative-prow knative-prow Bot added needs-ok-to-test 🤖 Needs an org member to approve testing size/M 🤖 PR changes 30-99 lines, ignoring generated files. labels Oct 24, 2025
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented Oct 24, 2025

Hi @intojhanurag. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-sigs/prow repository.

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 24, 2025

Codecov Report

❌ Patch coverage is 13.15789% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.94%. Comparing base (39c321d) to head (ac97a6a).
⚠️ Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
pkg/docker/runner.go 13.15% 31 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3143      +/-   ##
==========================================
+ Coverage   59.39%   59.94%   +0.54%     
==========================================
  Files         134      133       -1     
  Lines       13495    13524      +29     
==========================================
+ Hits         8016     8107      +91     
+ Misses       4538     4443      -95     
- Partials      941      974      +33     
Flag Coverage Δ
e2e-tests 41.61% <13.15%> (+1.37%) ⬆️
integration-tests 54.59% <13.15%> (+1.59%) ⬆️
unit-tests 45.35% <0.00%> (-1.39%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@intojhanurag
Copy link
Copy Markdown
Member Author

Hey @lkingland , Can you review this PR. I am not sure why that 1 test is failing.

@intojhanurag intojhanurag force-pushed the add-local-volume-support branch from 4582248 to ac97a6a Compare October 24, 2025 08:47
@gauron99
Copy link
Copy Markdown
Contributor

gauron99 commented Nov 1, 2025

I see in the unit test Caused by: java.io.EOFException: SSL peer shut down incorrectly

@intojhanurag
Copy link
Copy Markdown
Member Author

I see in the unit test Caused by: java.io.EOFException: SSL peer shut down incorrectly

hey @gauron99 , So what I can do for this ?

@gauron99
Copy link
Copy Markdown
Contributor

gauron99 commented Nov 2, 2025

I dont know, havent seen this error exactly. You can track it down and try to debug what happened. But some change you made in this code is causing that because it doesnt happen on main

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

Labels

needs-ok-to-test 🤖 Needs an org member to approve testing size/M 🤖 PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Volume Mounts for Local Runs

2 participants