User request
There is an Organizations service (previously called tenants) and the codebase still has mixed naming.
We need to:
- Remove tenants naming from the codebase completely and standardize on Organizations.
- Do not edit historical migration files.
- Downtime is acceptable; we do not need a migration/compatibility layer. It’s acceptable to drop and recreate the Organizations DB.
Specification (from agynio/architecture)
Canonical terminology/contract is Organizations:
- Scope field:
organization_id
- Gateway contract:
OrganizationsGateway with methods like CreateOrganization, GetOrganization, ListOrganizations, membership methods, etc.
- AuthZ (OpenFGA): object type
organization (e.g., organization:<orgId>)
- DB tables:
organizations, memberships
Implementation scope (repo scan)
agynio/bootstrap
Rename infra resources currently named tenants*:
- Terraform variables:
tenants_db_password, tenants_db_pvc_size → organizations_db_password, organizations_db_pvc_size
- Locals:
tenants_db_values → organizations_db_values
- ArgoCD apps:
tenants-db / tenants → organizations-db / organizations
- Helm values for Organizations service:
fullnameOverride should deploy as organizations (not tenants)
DATABASE_URL should use DB/user/name organizations (not tenants)
- Remove any k8s selectors/labels referencing
app.kubernetes.io/instance = tenants
- Remove the
organizations_alias service if it exists only to point organizations → tenants.
agynio/organizations
- Update
devspace.yaml to stop referencing ArgoCD app/deployment/service names as tenants and use organizations consistently.
- Do not modify the existing historical migrations that mention
tenants.
agynio/api
- Remove stale
proto/agynio/api/tenants/v1/tenants.proto reference from buf.yaml (breaking ignore list).
agynio/platform
- Replace doc wording that uses “tenant” to refer to org-scoped customer data (e.g., “tenant-specific”) with “organization-specific”.
Acceptance criteria
- No remaining
tenants naming in runtime code/config across the above repos (excluding historical migrations).
- Bootstrap deploys:
- Organizations service as
organizations
- Organizations DB as
organizations-db
- DB name/user =
organizations
- Local formatting/tests pass in each touched repo (Go tests, Terraform fmt/validate if present, buf checks).
User request
There is an Organizations service (previously called tenants) and the codebase still has mixed naming.
We need to:
Specification (from
agynio/architecture)Canonical terminology/contract is Organizations:
organization_idOrganizationsGatewaywith methods likeCreateOrganization,GetOrganization,ListOrganizations, membership methods, etc.organization(e.g.,organization:<orgId>)organizations,membershipsImplementation scope (repo scan)
agynio/bootstrapRename infra resources currently named
tenants*:tenants_db_password,tenants_db_pvc_size→organizations_db_password,organizations_db_pvc_sizetenants_db_values→organizations_db_valuestenants-db/tenants→organizations-db/organizationsfullnameOverrideshould deploy as organizations (not tenants)DATABASE_URLshould use DB/user/name organizations (not tenants)app.kubernetes.io/instance = tenantsorganizations_aliasservice if it exists only to pointorganizations→tenants.agynio/organizationsdevspace.yamlto stop referencing ArgoCD app/deployment/service names astenantsand useorganizationsconsistently.tenants.agynio/apiproto/agynio/api/tenants/v1/tenants.protoreference frombuf.yaml(breaking ignore list).agynio/platformAcceptance criteria
tenantsnaming in runtime code/config across the above repos (excluding historical migrations).organizationsorganizations-dborganizations