TODO: eventually this repo will work with build containers for now using the host. So for now the requiremenst to build and test this project are:
- docker
- golang
- minikube (for tests)
- kubectl
To push your build target to a docker registry you first need to change the default target, replace SERVICE
variable in the makefile to your docker registry
make all
will only
After every change in the api (swagger.yaml) the code should be generated and the build must pass
make generate-from-swagger
Pre-configuration
- Make sure to change the image in
deploy/bm-inventory.yaml
to your docker registry (the same one from the first setup instructions). - Run minikube on your system.
- Deploy service, DB and other requirements
make deploy-all
- Wait for all the pods to be up.
Running the tests:
make subsystem-run
if you are making changes and don't want to deploy everything once again you can simple run this command
make update && kubectl get pod -o name | grep bm-inventory | xargs kubectl delete
if will build and push a new image of the service to your docker registry, then delete the service pod from minikube, the deployment will handle the update and pull the new image to start the service again.