This folder stores various contents related to Basegun deployment.
- Using Github actions, we trigger either the preprod deployment or the prod deployment.
- For both of them, a second workflow using specific env variables to differentiate preprod from prod updates the kube file values.yml and pushes this change in the corresponding infra branch (main=prod, develop=preprod).
- The service ArgoCD will detect the change in our repo values.yml on the branches it monitors (main=prod, develop=preprod). If we manually trigger synchronization, it updates the app in our kubernetes cluster.
-
preprod deployment is triggered manually via the
actions
tab on github. You select the action "CI for preprod" on the lefy, then click on "run workflow" on the right and select the branch which will be used for preprod deployment. Usually we use branch develop. -
prod deployment is triggered when pushing a tag. You can use the command
make tag
to help you do so. Usually we push the tag from branch main.
Helm is a templating tool facilitating the usage of Kubernetes. Deployment of the application with kube is done using helm, everything is in folder kube/helm/
The containers of the application are deployed using files in folder helm/templates
:
deployment-frontend.yml
: config for pod for frontend of basegundeployment-backend.yml
: config for pod for backend (container for backend + container for handling logs)
Some of the values in these configs are configured in helm/values.yaml
, and can be passed from CI/CD using keyword helm upgrade --install basegun ./infra/kube/helm/ --set="value.arg1.arg2=my-value"
which overwrites content of values.yml
.
To test a template / generate a manifest, you can use command helm template /path/to/file
.