-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
withFileSystemBind does not mount any files #30
Comments
This does only occur when executing in gitlab-ci pipeline or for testing purposes in a local cluster. |
I am trying to reproduce as well (using minikube), but I can't. Both with and without the --pre-archive all tests produce the expected output. Is the instance of kubedock able to directly access the files, or folders? What I have seen e.g. in similar issues, is that kubedock is running in a sidecar, but the actual folders that are to be bound are not available in that sidecar; maybe it is something similar? |
Did some more extensive testing and the only way to reproduce is when the volumes which are to be bound, are not directly accessible by kubedock. The other working methods in your tests are methods that copy the files from the running test system via the rest api, and don't require direct access to the filesystem. See also the tekton example here, where the source folder is also mounted in the sidecar, making the folders directly accessible for kubedock as well. |
I will check out the example and provide you with more information if needed. Had no time yet to dig into. |
I stepped through the kubedock code when called from testcontainers.net kubedock/internal/server/routes/docker/types.go Lines 39 to 44 in 8b1f7ce
Not sure if this is also what testcontainers java does but I think kubedock should support Mounts since IIRC it's the more recent and feature-rich API? |
I'm not sure if I have similar issue. But only happen with testcontainers .NET and not java or node. So something different on implementation. The point is that expect my container (ryuk) to be created with sidecars when it's not. So it could be possible the socket bind created differently on docker API. Dind setup works great for Java and Node. |
@mausch @jonesbusy I added support for mounts in hostconfig, that fixed ryuk support for dotnet at my end. |
Nice! I'll give it a try in a few days, thanks! |
Kubedock Version
0.9.2
Host OS
MacOS
Host Arch
ARM
Environment:
Local Cluster with k3d:
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.10+k3s1", GitCommit:"471f5eb3dbfeaee6b6dd6ed9ab4037c10cc39680", GitTreeState:"clean", BuildDate:"2022-02-24T23:38:19Z", GoVersion:"go1.16.10", Compiler:"gc", Platform:"linux/arm64"}
Gitlab CI/CD pipeline k8s cluster:
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.9", GitCommit:"b631974d68ac5045e076c86a5c66fba6f128dc72", GitTreeState:"clean", BuildDate:"2022-01-19T17:45:53Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"linux/amd64"}
Steps to Reproduce:
Expected:
Actual:
Additional Information:
The argument "--pre-archive" needs to be set for kubedock. Otherwise no copy/mount did work at all.
We tried mounting and copying files to the container with all available possibilities.
None of them is working on it's own. Meaning if you use any of the following methods
no file is ever mounted or copied.
However when combining multiple of these Methods they partly work.
Whenever the method ".withFileSystemBind(...)" is present for the container, all
other copies work as expected. But the filesystembind itself does not. In this case
there is a config map as well as the mounted files present in the container.
Following shows the describe for the started alpinecontainer.
With all 4 methods called:
The same output without the .withFileSystemBind BUT still we the other 3 copies (no volume present afterwards):
Used example test:
The text was updated successfully, but these errors were encountered: