Hi im thinking about using garden for
# 💻|contributing
f
Hi, im thinking about using garden for our CI. The problem I face is I use kubernetes and have 5 or so downstream services that are part of the integration test. Before merging to prod i would like to know that the project being worked on works well with all those other 4, and likewise those other 4 work well with this project. When the integration test works there might be service 1 calling 2 and 2 calling 3 and so forth. What i'm wondering with Garden is when a test runs how does it know to route the traffic well for a new version of 2 being tested (how does 1 know to call this other version of 2)? Currently we use DNS names (the name of the kubernetes service) for 1 to call 2. Im just a bit confused as to how this bit works
f
Hi @fancy-library-56392 , i am not sure i completely understood your question but maybe you can help me with some relevant parts of your garden config. In general when you run
garden test
, garden will take care to first build and deploy all dependencies of that test, in this example frontend and backend.
Copy code
# garden.yml
kind: Test
name: e2e
type: container
build: frontend
dependencies:
  - deploy.frontend
  - deploy.backend
spec:
  args: [npm, run, e2e]
For the communication between services garden will also use internal kubernetes DNS. Since garden waits for the deploy actions that are specified as dependencies in the test, the kubernetes service will always route to the latest deployed version. Was that helpful or did i miss something in your question?