What number of agents should I have?

hello I am James from Chicago
I am attempting to build a declarative GitOps framework for Kubernetes that is branch-based. I aim to create crossplane clusters on a cloud provider, and these clusters will be stored in Gitlab. When I begin construction, though, I appear to encounter gitlab-agent sprawl.

Every application I will deploy to each of my environments is stored in a separate git repository, and I am wondering if I require a separate agent for each repository and environment. I have three clusters, including production, staging, and development, and three applications, including API, Kafka, and DB. It seems excessive that I’ve begun using three agents per repository (gitlab-agent-api-prod, gitlab-agent-kafka-stage, etc.). Do I actually need nine agents?

In addition, I must now deploy as many agents as I have applications on each of my clusters, which is already a resource-intensive endeavour. I feel that one gitlab agent per cluster is sufficient, but I do not understand how this is performed. Every aid is appreciated!

Hi @jamesbonds

you can specify multiple projects in GitLab Agent config as source for Kubernetes manifest files.

  - id: group/project1
    default_namespace: namespace1
  - id: group/project2
    default_namespace: namespace2