-
Notifications
You must be signed in to change notification settings - Fork 25
e2e: add environment for kind #64
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
Conversation
cfcd033 to
9514f8c
Compare
|
Despite what CI says, the tests on macOS are actually failing: https://github.com/efficientgo/e2e/actions/runs/4491794039/jobs/7900760164#step:6:194 Mounting the volumes is working seamlessly across all of the layers! However, there seems to be an issue with connecting to the NodePort service for pods. I am not familiar with how Colima/Lima forward ports and don't have a mac to test this. This works out-of-the-box on Linux, but it is also jumping one layer less: I'm guessing, since I don't have a mac to test, but I image the issue is with getting packets from the host to the Lima VM, since the discovered IP address is the address of the "node" and not of the Lima VM, so the packets destined to the "node" can't be routed. Does anybody have a mac to help debug this? Maybe we can pair? |
|
@squat let me try to run the tests on my Mac and report back 👍 |
|
Thanks @matej-g ⭐ We should also make sure that CI actually fails when the tests fail |
|
So I got the same results initially on my local (could not reach container). I roughly followed the guide from here (Step 5 - https://baptistout.net/posts/kubernetes-clusters-on-macos-with-loadbalancer-without-docker-desktop/, slightly adjusted for Colima), to setup the whole end-to-end networking. After which the test passed fine. So presumably (unless there's an easier way to set it up), we'd need to automate this and add necessary config on both the runner host and inside of Lima VM. Happy to pair on this! |
|
Oh cool that you got that to work! I was reading that exact same blog last nicht at 3am hahaha I have a suspicion that for a typical Lima/Colima setup we might be able to get away with only one (max two) step(s):
It would be great to pair on this to see if it could be this simple. |
8649ebe to
5f3967b
Compare
|
I got the tests to pass on macOS! However, I was wrong, not only were those two steps necessary, but a third one was necessary as well! PS: I was finally able to test this by running a macOS VM on my Linux machine, so the entire stack is: |
matej-g
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested the updated CI setup locally, tests are working 🌟.
Nice addition, this looks good to me overall. I think it would be good to document the KinD environment and especially document the usage (i.e. runnables can be only Deployment, for other objects users need to do it by hand). But this can be a separate PR.
This commit allows the macOS host in CI to route packets directly to the IP addresses of containers running inside the Lima guest VM, without needing to explicitly forward ports via SSH. This allows macs to behave the same way that Linux hosts do. Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
865940b to
db8a632
Compare
This commit adds a new implementation of the Environment interface implemented using kind, ie Kubernetes in Docker. The motivation is that you might want to manually run some complex configurations in the e2e tests using Kubernetes resources and still manage the tests simply using the e2e package. Users who need the escape hatch of deploying things to a Kubernetes cluster manually, e.g. workloads that are not a simple deployment, can use the kubeconfig file located in the environment's shared directory. Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
db8a632 to
8bef03d
Compare
|
oki everything should be ready for now! I'll make a follow-up with some more documentation, if that works |
matej-g
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @squat 🙇
* CI: ensure macOS can connect to containers in Lima This commit allows the macOS host in CI to route packets directly to the IP addresses of containers running inside the Lima guest VM, without needing to explicitly forward ports via SSH. This allows macs to behave the same way that Linux hosts do. Signed-off-by: Lucas Servén Marín <lserven@gmail.com> * e2e: add environment for kind This commit adds a new implementation of the Environment interface implemented using kind, ie Kubernetes in Docker. The motivation is that you might want to manually run some complex configurations in the e2e tests using Kubernetes resources and still manage the tests simply using the e2e package. Users who need the escape hatch of deploying things to a Kubernetes cluster manually, e.g. workloads that are not a simple deployment, can use the kubeconfig file located in the environment's shared directory. Signed-off-by: Lucas Servén Marín <lserven@gmail.com> --------- Signed-off-by: Lucas Servén Marín <lserven@gmail.com>
This commit adds a new implementation of the Environment interface
implemented using kind, ie Kubernetes in Docker. The motivation is that
you might want to manually run some complex configurations in the e2e
tests using Kubernetes resources and still manage the tests simply using
the e2e package.
Users who need the escape hatch of deploying things to a Kubernetes
cluster manually, e.g. workloads that are not a simple deployment, can
use the kubeconfig file located in the environment's shared directory.
Signed-off-by: Lucas Servén Marín lserven@gmail.com