-
Notifications
You must be signed in to change notification settings - Fork 172
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
Preserve background process from initContainers to runner #394
Comments
Hi @robooo, thanks for opening the issue! This is an interesting case. AFAIS, This never came up before and there is an argument to be made that k6 container in the runner pod shouldn't have any other containers in order to avoid skewing results of the test.
Out of curiosity, why is it not possible? I.e. "normally", Kubernetes access can be set up so that one won't need to run custom VPN scripts inside. |
Thanks @yorugac! I understand, but I don't want to create some new "proxy pod" with installed binaries and running vpn and then route k6 via it, since it can be a bottleneck. Or are there some recommended deployment examples in case of using vpn + k6? I just really want to execute the binaries before k6 run to be able to access the backend and route the traffic via it. The init container was the first approach which I've tried and yesterday I found another way with xk6-exec which allowed me to execute the vpn binary right from the test case (in the k6 container) after few tweaks I'm able to run it in the background too. But wouldn't it be easier to allow |
This is a good workaround 👍 Thanks for sharing, @robooo!
Not really, AFAIK... In your use case, there's a restriction that you have to run this script "manually" before k6 execution. I imagine usually people make their Kubernetes setup for k6-operator without such internal restrictions. Why do you need VPN inside Kubernetes cluster? Or is it that you're trying to test some service outside of Kubernetes cluster that is reachable only via VPN? Some details would really help here. |
This topic actually reminded of multi-cluster problem and related projects, like this one. |
@yorugac exactly! I'm trying to test/reach webserver from outside of Kubernetes cluster that is reachable only via VPN. It is no openvpn or something opensourced but more internal. The next step will be execute it from a different cluster in cloud not from local private server but I think the approach needs to be the same. |
Feature Description
My current deployment requires to do vpn connections which are done by executing a process in the background e.g.
./scripts/vpn &
. If I don't execute it in background then k6 pod is waiting forever. I'm not able to change the connection approach/logic.I hoped initContainers can help me, like I can setup the interface and other commands but can't keep alive the background process for k6 execution.
Suggested Solution (optional)
I'm not sure if allowing shareProcessNamespace: true would solve this?
Based on this https://stackoverflow.com/questions/65576193/how-to-keep-a-process-running-throughout-pod-lifecycle
If there is some easier way please let me know.
Already existing or connected issues / PRs (optional)
No response
The text was updated successfully, but these errors were encountered: