Enable local volume mounts in func run for ConfigMaps, Secrets, EmptyDirs, and PVCs
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
- ConfigMap →
- Added warnings for volumes that attempt to map outside of
.functo prevent accidental access to sensitive host directories. - Preserves existing behavior for port bindings and other container settings.
[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.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
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.
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 Report
:x: Patch coverage is 13.15789% with 33 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 59.94%. Comparing base (39c321d) to head (ac97a6a).
:warning: 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 :warning: |
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%) |
:arrow_up: |
| integration-tests | 54.59% <13.15%> (+1.59%) |
:arrow_up: |
| unit-tests | 45.35% <0.00%> (-1.39%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Hey @lkingland , Can you review this PR. I am not sure why that 1 test is failing.
I see in the unit test Caused by: java.io.EOFException: SSL peer shut down incorrectly
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 ?
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