Skip to content

Commit 9411ea6

Browse files
committed
[docs] Tenant names cannot have dashes
Part of cozystack/cozystack#971 Signed-off-by: Nick Volynkin <[email protected]>
1 parent 1561a1b commit 9411ea6

3 files changed

Lines changed: 54 additions & 17 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ hugo/
1414

1515
# build directories
1616
/bin
17+
/tmp
1718

1819
# OSX .DS_Store
1920
.DS_Store

‎content/en/docs/guides/tenants.md‎

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,29 @@ A **tenant** is the main unit of security on the platform. The closest analogy w
1111

1212
Tenants can be created recursively and are subject to the following rules:
1313

14-
### Higher-level tenants can access lower-level ones.
14+
### Tenant naming
1515

16-
Higher-level tenants can view and manage the applications of all their children.
16+
Tenant names must be alphanumeric.
17+
Using dashes (`-`) in tenant names is not allowed, unlike with other services.
18+
This limitation exists to keep consistent naming in tenants, nested tenants, and services deployed in them.
1719

18-
### Each tenant has its own domain
20+
For example:
1921

20-
By default (unless otherwise specified), it inherits the domain of its parent with a prefix of its name, for example, if the parent had the domain `example.org`, then `tenant-foo` would get the domain `foo.example.org` by default.
22+
- The root tenant is named `root`, but internally it's referenced as `tenant-root`.
23+
- A nested tenant could be named `foo`, which would result in `tenant-foo` in service names and URLs.
24+
- However, a tenant can not be named `foo-bar`, because parsing names such as `tenant-foo-bar` would be ambiguous.
25+
26+
### Nested tenants
27+
28+
Tenants can be nested.
29+
A tenant administrator can create nested tenants using the "Tenant" application from the catalogue.
30+
Higher-level tenants can view and manage the applications of all their children tenants.
31+
32+
### Unique domains
33+
34+
Each tenant has its own domain.
35+
By default, (unless otherwise specified), it inherits the domain of its parent with a prefix of its name.
36+
For example, if the parent had the domain `example.org`, then `tenant-foo` would get the domain `foo.example.org` by default.
2137

2238
Kubernetes clusters created in this tenant namespace would get domains like: `kubernetes-cluster.foo.example.org`
2339

@@ -39,5 +55,5 @@ This in turn means:
3955

4056
![tenant services](/img/tenants2.png)
4157

42-
See the reference for the application implementing tenant management: [`tenant`]({{% ref "/docs/reference/applications/tenant" %}})
58+
See the reference for the application implementing tenant management: [`tenant`]({{% ref "/docs/reference/applications/tenant#parameters" %}})
4359

‎content/en/docs/reference/applications/tenant.md‎

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,55 @@ A tenant is the main unit of security on the platform. The closest analogy would
88

99
Tenants can be created recursively and are subject to the following rules:
1010

11-
### Higher-level tenants can access lower-level ones.
11+
### Tenant naming
1212

13-
Higher-level tenants can view and manage the applications of all their children.
13+
Tenant names must be alphanumeric.
14+
Using dashes (`-`) in tenant names is not allowed, unlike with other services.
15+
This limitation exists to keep consistent naming in tenants, nested tenants, and services deployed in them.
1416

15-
### Each tenant has its own domain
17+
For example:
1618

17-
By default (unless otherwise specified), it inherits the domain of its parent with a prefix of its name, for example, if the parent had the domain `example.org`, then `tenant-foo` would get the domain `foo.example.org` by default.
19+
- The root tenant is named `root`, but internally it's referenced as `tenant-root`.
20+
- A nested tenant could be named `foo`, which would result in `tenant-foo` in service names and URLs.
21+
- However, a tenant can not be named `foo-bar`, because parsing names such as `tenant-foo-bar` would be ambiguous.
22+
23+
### Unique domains
24+
25+
Each tenant has its own domain.
26+
By default, (unless otherwise specified), it inherits the domain of its parent with a prefix of its name.
27+
For example, if the parent had the domain `example.org`, then `tenant-foo` would get the domain `foo.example.org` by default.
1828

1929
Kubernetes clusters created in this tenant namespace would get domains like: `kubernetes-cluster.foo.example.org`
2030

2131
Example:
22-
```
32+
```text
2333
tenant-root (example.org)
2434
└── tenant-foo (foo.example.org)
2535
└── kubernetes-cluster1 (kubernetes-cluster1.foo.example.org)
2636
```
2737

28-
### Lower-level tenants can access the cluster services of their parent (provided they do not run their own)
38+
### Nesting tenants and reusing parent services
39+
40+
Tenants can be nested.
41+
A tenant administrator can create nested tenants using the "Tenant" application from the catalogue.
2942

30-
Thus, you can create `tenant-u1` with a set of services like `etcd`, `ingress`, `monitoring`. And create another tenant namespace `tenant-u2` inside of `tenant-u1`.
43+
Higher-level tenants can view and manage the applications of all their children tenants.
44+
If a tenant does not run their own cluster services, it can access ones of its parent.
45+
46+
For example, you create:
47+
- Tenant `tenant-u1` with a set of services like `etcd`, `ingress`, `monitoring`.
48+
- Tenant `tenant-u2` nested in `tenant-u1`.
3149

3250
Let's see what will happen when you run Kubernetes and Postgres under `tenant-u2` namespace.
3351

34-
Since `tenant-u2` does not have its own cluster services like `etcd`, `ingress`, and `monitoring`, the applications will use the cluster services of the parent tenant.
35-
This in turn means:
52+
Since `tenant-u2` does not have its own cluster services like `etcd`, `ingress`, and `monitoring`,
53+
the applications running in `tenant-u2` will use the cluster services of the parent tenant.
3654

37-
- The Kubernetes cluster data will be stored in etcd for `tenant-u1`.
38-
- Access to the cluster will be through the common ingress of `tenant-u1`.
39-
- Essentially, all metrics will be collected in the monitoring from `tenant-u1`, and only it will have access to them.
55+
This in turn means:
4056

57+
- The Kubernetes cluster data will be stored in `etcd` for `tenant-u1`.
58+
- Access to the cluster will be through the common `ingress` of `tenant-u1`.
59+
- Essentially, all metrics will be collected in the `monitoring` from `tenant-u1`, and only that tenant will have access to them.
4160

4261
Example:
4362
```
@@ -50,6 +69,7 @@ tenant-u1
5069
└── postgres-db1
5170
```
5271

72+
5373
## Parameters
5474

5575
### Common parameters

0 commit comments

Comments
 (0)