You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cca54d8
Browse filesBrowse the repository at this point in the historyBrowse files
Document the five instance-type series (t1/c1/s1/u1/m1) introduced
alongside the legacy preset deprecation, the per-size CPU and memory
matrix, and the 1:1 legacy-to-instance-type mapping table that powers
cozy-lib aliases, migration 39, and the operator-side deprecation
warning.
Single source of truth referenced from:
- packages/library/cozy-lib/templates/_resourcepresets.tpl
- packages/core/platform/images/migrations/migrations/39
- pkg/apis/apps/presets/legacy.go
Includes an explicit callout that legacy `medium` (1 CPU / 1Gi) and
instance-type `*.medium` (2 CPU) are not the same — same word,
different resources.
Replace inline preset tables in packages/apps/postgres/README.md and
packages/apps/kafka/README.md with a short paragraph that names the
five series and points at the canonical doc, since the per-app
inline tables listed only the legacy seven and would drift further
as the canonical matrix evolves.
Co-authored-by: Matthieu ROBIN <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
Every cozystack app exposes a `resourcesPreset` field whose value selects a CPU and memory reservation. Presets follow a cloud-style `<series>.<size>` naming convention. Setting `resources:` explicitly overrides the preset.
|`s1`| 1:2 | Standard — proxies, caches, lightweight services |
12
+
|`u1`| 1:4 | Universal — databases and messaging |
13
+
|`m1`| 1:8 | Memory-heavy — search, analytics, large caches |
14
+
15
+
## Watch out: legacy and instance-type `medium` differ
16
+
17
+
Legacy `medium` had **1 CPU / 1Gi**. The new `*.medium` sizes have **2 CPU** (in any series). The names overlap but the resources do not. The migration table below stays correct — `medium → c1.small (1 CPU / 1Gi)` — but if you read the instance-type sizing matrix first and pick `c1.medium` "to keep things the same", you will double your CPU. When in doubt, consult the legacy-to-instance-type mapping at the bottom of this page.
18
+
19
+
## Sizes
20
+
21
+
| Size | CPU | t1 mem | c1 mem | s1 mem | u1 mem | m1 mem |
The following short names existed before the instance-type rename and remain accepted for backward compatibility. They render exactly the CPU and memory they did before — the legacy block in `cozy-lib` returns the original values verbatim. The 1:1 mapping is:
37
+
38
+
| Legacy | CPU | Memory | Instance-type equivalent |
Legacy names are scheduled for removal in a future cozystack release. New manifests should use the instance-type form. `cozystack-api` emits a `klog` warning whenever an app CR carries a legacy value, naming the suggested replacement.
49
+
50
+
## Automatic migration
51
+
52
+
Platform upgrades run `migration 39` as a pre-upgrade hook. It walks every `HelmRelease``spec.values` and every app CR under `apps.cozystack.io/v1alpha1`, rewriting legacy `resourcesPreset` values in place using the table above. The conversion is idempotent and best-effort: a failure on one object logs a warning and leaves the rest of the migration to complete. Set `MIGRATION_DRY_RUN=1` to preview the patches without applying them.
|`zookeeper.replicas`| Number of ZooKeeper replicas. |`int`|`3`|
43
+
|`zookeeper.resources`| Explicit CPU and memory configuration. When omitted, the preset defined in `resourcesPreset` is applied. |`object`|`{}`|
44
+
|`zookeeper.resources.cpu`| CPU available to each replica. |`quantity`|`""`|
45
+
|`zookeeper.resources.memory`| Memory (RAM) available to each replica. |`quantity`|`""`|
46
+
|`zookeeper.resourcesPreset`| Default sizing preset used when `resources` is omitted. |`string`|`c1.small`|
47
+
|`zookeeper.size`| Persistent Volume size for ZooKeeper. |`quantity`|`5Gi`|
48
+
|`zookeeper.storageClass`| StorageClass used to store the ZooKeeper data. |`string`|`""`|
49
49
50
50
51
51
## Parameter examples and reference
@@ -64,15 +64,9 @@ resources:
64
64
`resourcesPreset` sets named CPU and memory configurations for each replica.
65
65
This setting is ignored if the corresponding `resources` value is set.
66
66
67
-
| Preset name | CPU | memory |
68
-
|-------------|--------|---------|
69
-
| `nano` | `250m` | `128Mi` |
70
-
| `micro` | `500m` | `256Mi` |
71
-
| `small` | `1` | `512Mi` |
72
-
| `medium` | `1` | `1Gi` |
73
-
| `large` | `2` | `2Gi` |
74
-
| `xlarge` | `4` | `4Gi` |
75
-
| `2xlarge` | `8` | `8Gi` |
67
+
Presets follow a cloud-style `<series>.<size>` naming convention. Five series cover the full CPU-to-memory ratio range (`t1` 1:0.5, `c1` 1:1, `s1` 1:2, `u1` 1:4, `m1` 1:8) and each series ships eight sizes (`nano` through `4xlarge`). The legacy flat names (`nano`, `micro`, `small`, `medium`, `large`, `xlarge`, `2xlarge`) remain accepted as deprecated aliases of their 1:1 instance-type equivalents.
68
+
69
+
See [`docs/operations/resource-presets.md`](../../../docs/operations/resource-presets.md) for the full size matrix and the legacy-to-instance-type mapping.
| `replicas` | Number of Postgres replicas. | `int` | `2` |
168
-
| `resources` | Explicit CPU and memory configuration for each PostgreSQL replica. When omitted, the preset defined in `resourcesPreset` is applied. | `object` | `{}` |
169
-
| `resources.cpu` | CPU available to each replica. | `quantity` | `""` |
170
-
| `resources.memory` | Memory (RAM) available to each replica. | `quantity` | `""` |
171
-
| `resourcesPreset` | Default sizing preset used when `resources` is omitted. | `string` | `micro` |
172
-
| `size` | Persistent Volume Claim size available for application data. | `quantity` | `10Gi` |
173
-
| `storageClass` | StorageClass used to store the data. | `string` | `""` |
174
-
| `external` | Enable external access from outside the cluster. | `bool` | `false` |
175
-
| `version` | PostgreSQL major version to deploy | `string` | `v18` |
| `replicas` | Number of Postgres replicas. | `int` | `2` |
168
+
| `resources` | Explicit CPU and memory configuration for each PostgreSQL replica. When omitted, the preset defined in `resourcesPreset` is applied. | `object` | `{}` |
169
+
| `resources.cpu` | CPU available to each replica. | `quantity` | `""` |
170
+
| `resources.memory` | Memory (RAM) available to each replica. | `quantity` | `""` |
171
+
| `resourcesPreset` | Default sizing preset used when `resources` is omitted. | `string` | `t1.micro` |
172
+
| `size` | Persistent Volume Claim size available for application data. | `quantity` | `10Gi` |
173
+
| `storageClass` | StorageClass used to store the data. | `string` | `""` |
174
+
| `external` | Enable external access from outside the cluster. | `bool` | `false` |
175
+
| `version` | PostgreSQL major version to deploy | `string` | `v18` |
176
176
177
177
178
178
### Application-specific parameters
@@ -260,15 +260,9 @@ resources:
260
260
`resourcesPreset`sets named CPU and memory configurations for each replica.
261
261
This setting is ignored if the corresponding `resources` value is set.
262
262
263
-
| Preset name | CPU | memory |
264
-
|-------------|--------|---------|
265
-
| `nano` | `250m` | `128Mi` |
266
-
| `micro` | `500m` | `256Mi` |
267
-
| `small` | `1` | `512Mi` |
268
-
| `medium` | `1` | `1Gi` |
269
-
| `large` | `2` | `2Gi` |
270
-
| `xlarge` | `4` | `4Gi` |
271
-
| `2xlarge` | `8` | `8Gi` |
263
+
Presets follow a cloud-style `<series>.<size>` naming convention. Five series cover the full CPU-to-memory ratio range (`t1` 1:0.5, `c1` 1:1, `s1` 1:2, `u1` 1:4, `m1` 1:8) and each series ships eight sizes (`nano` through `4xlarge`). The legacy flat names (`nano`, `micro`, `small`, `medium`, `large`, `xlarge`, `2xlarge`) remain accepted as deprecated aliases of their 1:1 instance-type equivalents.
264
+
265
+
See [`docs/operations/resource-presets.md`](../../../docs/operations/resource-presets.md) for the full size matrix and the legacy-to-instance-type mapping.
0 commit comments