-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add option to provide Kubernetes cluster for testing #2170
Comments
I like this actually. Currently, we spin-up the localhost registry and use that by default. If we provide a way to specify custom docker image/tag - user would be able to pass their existing registries. If we also provide an extension point to integrate with something like |
So, there are 4 different components/steps to testing Kubernetes:
We could expose the script on three different granularitis:
@MOZGIII @LucioFranco what do you think? Also what are your experiences with different Kubernetes cluster meant for testing? Like minikube, microk8s, kind, and the like. |
The major thing we need implemented is this some script that can build vector, push an image to some registry, and run a set of integration tests against some kube cluster. The config for this should be some kubeconfig and a registry url. This should then allow us to test against any kube cluster whether it is kind, minikube or an actual cluster running somewhere in the cloud. I would not worry about the script setting up a cluster because locally that is very trivially done via minikube. |
I agree, then to keep it simple we could only support that. |
I think it's cool that we can provide a registry. It would be great to have a script for that, maybe to run ad-hoc. We can also consider using an empty container for vector, and copying compiled files into it before running the test (skaffold/ksync style). This way we don't need a registry.
I've been using |
Also, I'm looking for the tooling that I could call manually. I'm not opposed to having a script that implements a "whole process", but it would be great if it simply outlines the logic while being composed of smaller individually callable components. I.e. so that I can invoke building vector docker image manually. |
I don't think we have users running enough tests for kube to make that worth it. Ideally, CI should cover the majority case and users that need to do so locally should be able to stand up what they need. |
The utilities are not for our users, they're for us. CI should cover the cases that CI is built for, however, when developing, if I want to try to run the code I make at k8s I have to build the image myself. So, I'm all about having an option to do bin/build-docker-image mozgiii/vector-tests:mytest taget/release/vector instead of docker build -t "mozgiii/vector-tests:mytest" -f - . << EOF
FROM buildpack-deps:18.04-curl
COPY ./taget/release/vector /usr/local/bin
ENTRYPOINT ["/usr/local/bin/vector"]
EOF Take a look at scripts/kubernetes-test.sh, it has a bunch of cool useful subroutines that could be easily exposed as commands and then reused. |
@MOZGIII that seems totally fine, I would say that we can expect developers to have docker and a valid kubeconfig. From there we can write a script as you said to build the image and run tests. |
Fixed via #2702. |
With #1970, running Kubernetes tests with
make
will start Kubernetes cluster usingkind
which is known to being slow at times which can trigger timeouts in out tests.One of the solutions for this is to enable usage of user provided cluster.
This would solve the issue of timeouts, and enable easier testing on different clusters.
Main issue with this is how to robustly provide builded image, of vector binary to be executed, to the provided Kubernetes cluster.
One way of doing it is by requesting the user to provide a registry to which the image can be pushed.
The text was updated successfully, but these errors were encountered: