Tenant resources are expected to utilize the following folder structure:
tenants/<tenant-name>/<resource-category>/base
tenants/<tenant-name>/<resource-category>/overlays/<cluster>
For Example:
tenants/
└── my-team
├── namespaces
│ ├── base
│ └── overlays
│ ├── my-cluster-1
│ └── my-cluster-2
└── rbac
├── base
└── overlays
└── my-cluster-2
The tenant-name
should be a logical name used for grouping assets that belong to a specific group or team. tenant-name
will most commonly correspond to a team name.
The resource-category
can be any logical grouping of resources that you wish to deploy together. How you wish to group your resources should be flexible based on your organizations needs.
The cluster
should correspond to the resources you wish to deploy to that specific cluster. If you do not include a cluster in the overlay, those resources will not be synced to that cluster.
Tenant resources synced by ArgoCD Application that is generated by the following ApplicationSet:
This ApplicationSet uses a git generator to find folders with the correct cluster in the overlays. An application is created for each combination of tenant and resource-category that is available for that cluster.
spec:
generators:
- git:
directories:
- path: tenants/*/*/overlays/my-cluster-1
The example above will generate the following applications on my-cluster-1 and my-cluster-2.
my-cluster-1:
my-team-namespaces
my-team-rbac
my-cluster-2:
my-team-namespaces