Gravity Agent for k8s is a multi-cloud and multi-region deployment tool. It enables easy replication of applications, low-code CI/CD setup on top of ArgoCD.
gravity.yaml
file to the root of your repository.You can use the following example as a template:
metadata:
name: nodejs-app
spec:
branch:
- name: main
approval: manual
- name: development
approval: automatic
aws:
repository:
- name: nodejs-app-east
regions:
- us-east-1
branch: main
valueFile:
source: s3
bucket: gravity-app-prod-values
If you are using Github to store the values file, you can use the following example to setup the repository:
metadata:
name: nodejs-app
spec:
branch:
- name: main
approval: manual
- name: development
approval: automatic
aws:
repository:
- name: nodejs-app-east
regions:
- us-east-1
branch: main
valueFile:
source: git
Update Github Action workflow with name as Deploy
and only run CI, tests and any business logic to generate values file (such as secrets, no need to manage docker images)
You can also add pre-deploy
scripts to run any commands before the deployment (such as linting, testing, etc.)
```yaml
metadata:
name: mono-repo-js
spec:
branch:
helm upgrade --install gravity-cicd-agent https://gravitycloudai.github.io/gravity-k8s-ci-cd-agent -f ./chart/values.yaml -n gravity-cloud --create-namespace
Logon to Gravity UI and go to Kubernetes -> Pipelines -> Pipeline Charts OR visit Console Here
Click on Create a new Pipeline Chart
Select the pre-defined chart and edit the values file as per your requirement
Once added, the agent will automatically sync the changes and deploy the helm chart to the respective environment when the new branch is created or updated.
Upon the deletion of the branch, the agent will delete the helm chart from the respective environment.