Files
devops-lib-gcp/docs/wiki/pages/policy/multi-tenancy.md
T
2026-08-26 02:02:24 +05:30

2.3 KiB

Generated 2026-05-12 at base-sha 28f54cf7bef9. Type: concept. 0 sources.

Multi-Tenancy: BU and Team Mapping

Meesho's CI/CD pipeline partitions services by business unit (BU) and team. buTeamMapping.groovy translates full BU/team names to short initials used in Helm chart paths, Docker image paths, and ArgoCD namespaces.

Where it applies in this repo

src/com/meesho/utilities/buTeamMapping.groovy

get_bu_initials(bu) maps full BU names to short abbreviations:

  • supplysu, demandde, centralce, dataenggda, datascienceds, mcachemc, infrain

get_team_initials(team) maps team slug to a short initial (typically first 2-4 chars of the slug).

These initials are used to construct:

  • Helm chart paths: devops-helm-charts/<helmChartsPath>/<buIni>/<teamIni>/<app_name>/
  • ArgoCD app names: <env>-<teamIni>-<app_name> (or similar)
  • ArgoCD namespace: argocd-<bu>-prd (GCP prd)
  • GCPProject: meesho-<bu>-prd-0622 (from constructParam.run())

config.yaml fields:

  • bu: must be one of the valid BU values (supply, demand, central, dataengg, datascience, mcache, infra).
  • team: must match a known team slug in buTeamMapping.
  • validateBuTeam.groovy in src/com/meesho/stages/ validates the BU/team combination before deployment.

Why this design

Multi-tenancy isolation is enforced structurally — a supply service's Helm values live in a separate directory from demand. If a service mis-declares its BU, its Helm charts and ArgoCD apps land in the wrong directory hierarchy, which causes the deploy to fail or overwrite another team's app. The initials mapping abstracts this from individual service owners.

Sources

(no raw/ sources at bootstrap)

Notes


← Wiki index