Skip to content
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

Investigate a solution for the local testing of the operator #475

Closed
sdudoladov opened this issue Jan 31, 2019 · 7 comments
Closed

Investigate a solution for the local testing of the operator #475

sdudoladov opened this issue Jan 31, 2019 · 7 comments

Comments

@sdudoladov
Copy link
Member

The current way of testing is to run minikube, either manually or with some tooling around it like /run-operator_locally.sh or Vagrant. This has at least three problems:

  1. minikube is a single node cluster => unsuitable for testing vital functions such as pod migration between nodes.
  2. minikube starts slowly; that prolongs local testing.
  3. every contributor needs to come up with their own solution for local testing

We need to come up with a better option which will enable us to conveniently and uniformly run e2e tests locally / potentially in Travis CI.

A promising option is kind

@sdudoladov
Copy link
Member Author

On the 1st look through the docs kind from k8s' own SIGTEST seems OK, or at least more stable/with better prospects than the alternatives

I will implement a single operator e2e test that uses operator-on-kind to create a PG DB to evaluate:

  1. start up costs
  2. ability to add/label nodes (needed to test pod migration, affinity etc.)
  3. necessary tooling. Ideally e2e tests should not require long custom bash scripts as minikube-based testing currently does.

@sdudoladov
Copy link
Member Author

@Jan-M @alexeyklyukin @erthalion @redbaron do you have more ideas ?

@Jan-M
Copy link
Member

Jan-M commented Feb 21, 2019

kind looks interesting to me if it can start 3 nodes locally and we can deploy/run our tests against this api similar to what we do internally.

@alexeyklyukin
Copy link
Contributor

I used to test the docker for Mac internal Kubernetes instead of minikube (on a Mac), as minikube was not particularly stable there, but kind looks promising indeed to test a multi-node migration.

@sdudoladov
Copy link
Member Author

FYI actual k8s e2e tests' infra overkill for our use case, but we might borrow ideas from it

@sdudoladov
Copy link
Member Author

one other dimension to consider is to add some mock of the S3 API; that may enable testing backups/clones etc. locally

@FxKu
Copy link
Member

FxKu commented Jun 14, 2019

So, #548 got merged by now. We should add a section in dev docs, though. Closing.

@FxKu FxKu closed this as completed Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants