Skip to main content

Tenant names

Available

Deployed and supported. The fields and commands described here are stable within version v1alpha1.

A tenant's name becomes at the same time its identifier, its subdomain (<tenant>.dev.stackngo.app), the prefix of its images (registry…/<tenant>/…) and the name of its identity organization. It is therefore constrained, and some names are forbidden.

The rule​

  • Lowercase letters a-z, digits 0-9, hyphens -.
  • Starts with a letter or a digit.
  • 30 characters at most at creation.
  • Neither reserved nor already taken.
acme ✓
acme-prod ✓
Acme ✗ majuscule
acme_prod ✗ souligné
-acme ✗ commence par un tiret

A refused name responds 400 with an explicit message (invalid organization: reserved name, invalid organization: too long (max 30)), a name already taken responds 409 conflict.

Reserved names​

The match is exact: prod is reserved, acme-prod is not. Names starting with stackngo- or sng-, as well as a few technical prefixes, are reserved entirely.

FamilyExamples
Environmentsdev, test, qa, staging, preprod, recette, demo, sandbox, prod, production, live, preview
Git branchesmaster, main, trunk, head
Common subdomainswww, api, auth, login, sso, mail, static, assets, status, docs, blog, help, support
Generic termsadmin, root, security, internal, public, private, null, all, shared, tenant, new, me
Platformstackngo, sng, platform, system, console, dashboard, and the names of the platform's services

This list gives examples; it is not exhaustive. sng tenant create tells you immediately if a name is reserved (invalid organization: reserved name).

Why​

  • An environment name (prod, staging) as a tenant name would make URLs and logs ambiguous for everyone. Prefer acme-prod, or better: one tenant per environment (see Environments and restore).
  • A common subdomain (api, auth, status) or a platform name would collide with the platform's addresses.

Choose a good name​

  • Short: it appears in all your URLs (web-shop.acme.dev.stackngo.app).
  • Stable: a tenant cannot be renamed. To change its name, you must create a new tenant, replay the manifests in it (sng pull then sng apply) and destroy the old one.
  • One per scope of rights: if two teams must not see each other's resources, they are two tenants.

If it doesn't work​

MessageFix
invalid organization: reserved nameThe name is reserved: add a prefix or a suffix (acme-prod)
invalid organization: too long (max 30)Shorten the name to 30 characters
invalid organization: … (other)Remove uppercase letters, underscores and special characters; start with a letter or a digit
409 conflictThe name is already taken: choose another one

See also​