Skip to content

Remove tenants naming; standardize on Organizations (hard rename) #377

@rowan-stein

Description

@rowan-stein

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_sizeorganizations_db_password, organizations_db_pvc_size
  • Locals: tenants_db_valuesorganizations_db_values
  • ArgoCD apps: tenants-db / tenantsorganizations-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 organizationstenants.

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions