Skip to content

Commit 980185c

Browse files
committed
[docs] Review the Clickhouse app docs
Signed-off-by: Nick Volynkin <[email protected]>
1 parent 8eabe30 commit 980185c

3 files changed

Lines changed: 79 additions & 59 deletions

File tree

‎packages/apps/clickhouse/README.md‎

Lines changed: 50 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,35 @@
11
# Managed Clickhouse Service
22

3+
ClickHouse is an open source high-performance and column-oriented SQL database management system (DBMS).
4+
It is used for online analytical processing (OLAP).
5+
Cozystack platform uses Altinity operator to provide ClickHouse.
6+
37
### How to restore backup:
48

5-
find snapshot:
6-
```
7-
restic -r s3:s3.example.org/clickhouse-backups/table_name snapshots
8-
```
9+
1. Find a snapshot:
10+
```
11+
restic -r s3:s3.example.org/clickhouse-backups/table_name snapshots
12+
```
913
10-
restore:
11-
```
12-
restic -r s3:s3.example.org/clickhouse-backups/table_name restore latest --target /tmp/
13-
```
14+
2. Restore it:
15+
```
16+
restic -r s3:s3.example.org/clickhouse-backups/table_name restore latest --target /tmp/
17+
```
1418
15-
more details:
16-
- https://itnext.io/restic-effective-backup-from-stdin-4bc1e8f083c1
19+
For more details, read [Restic: Effective Backup from Stdin](https://blog.aenix.io/restic-effective-backup-from-stdin-4bc1e8f083c1).
1720
1821
## Parameters
1922
2023
### Common parameters
2124
22-
| Name | Description | Value |
23-
| ---------------- | ----------------------------------- | ------ |
24-
| `size` | Persistent Volume size | `10Gi` |
25-
| `logStorageSize` | Persistent Volume for logs size | `2Gi` |
26-
| `shards` | Number of Clickhouse replicas | `1` |
27-
| `replicas` | Number of Clickhouse shards | `2` |
28-
| `storageClass` | StorageClass used to store the data | `""` |
29-
| `logTTL` | for query_log and query_thread_log | `15` |
25+
| Name | Description | Value |
26+
| ---------------- | -------------------------------------------------------- | ------ |
27+
| `size` | Size of Persistent Volume for data | `10Gi` |
28+
| `logStorageSize` | Size of Persistent Volume for logs | `2Gi` |
29+
| `shards` | Number of Clickhouse shards | `1` |
30+
| `replicas` | Number of Clickhouse replicas | `2` |
31+
| `storageClass` | StorageClass used to store the data | `""` |
32+
| `logTTL` | TTL (expiration time) for query_log and query_thread_log | `15` |
3033
3134
### Configuration parameters
3235
@@ -36,15 +39,32 @@ more details:
3639
3740
### Backup parameters
3841
39-
| Name | Description | Value |
40-
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
41-
| `backup.enabled` | Enable pereiodic backups | `false` |
42-
| `backup.s3Region` | The AWS S3 region where backups are stored | `us-east-1` |
43-
| `backup.s3Bucket` | The S3 bucket used for storing backups | `s3.example.org/clickhouse-backups` |
44-
| `backup.schedule` | Cron schedule for automated backups | `0 2 * * *` |
45-
| `backup.cleanupStrategy` | The strategy for cleaning up old backups | `--keep-last=3 --keep-daily=3 --keep-within-weekly=1m` |
46-
| `backup.s3AccessKey` | The access key for S3, used for authentication | `oobaiRus9pah8PhohL1ThaeTa4UVa7gu` |
47-
| `backup.s3SecretKey` | The secret key for S3, used for authentication | `ju3eum4dekeich9ahM1te8waeGai0oog` |
48-
| `backup.resticPassword` | The password for Restic backup encryption | `ChaXoveekoh6eigh4siesheeda2quai0` |
49-
| `resources` | Resources | `{}` |
50-
| `resourcesPreset` | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production). | `nano` |
42+
| Name | Description | Value |
43+
| ------------------------ | --------------------------------------------------------------------------- | ------------------------------------------------------ |
44+
| `backup.enabled` | Enable periodic backups | `false` |
45+
| `backup.s3Region` | AWS S3 region where backups are stored | `us-east-1` |
46+
| `backup.s3Bucket` | S3 bucket used for storing backups | `s3.example.org/clickhouse-backups` |
47+
| `backup.schedule` | Cron schedule for automated backups | `0 2 * * *` |
48+
| `backup.cleanupStrategy` | Retention strategy for cleaning up old backups | `--keep-last=3 --keep-daily=3 --keep-within-weekly=1m` |
49+
| `backup.s3AccessKey` | Access key for S3, used for authentication | `oobaiRus9pah8PhohL1ThaeTa4UVa7gu` |
50+
| `backup.s3SecretKey` | Secret key for S3, used for authentication | `ju3eum4dekeich9ahM1te8waeGai0oog` |
51+
| `backup.resticPassword` | Password for Restic backup encryption | `ChaXoveekoh6eigh4siesheeda2quai0` |
52+
| `resources` | Explicit CPU/memory resource requests and limits for the Clickhouse service | `{}` |
53+
| `resourcesPreset` | Use a common resources preset when `resources` is not set explicitly. | `nano` |
54+
55+
56+
In production environments, it's recommended to set `resources` explicitly.
57+
Example of `resources`:
58+
59+
```yaml
60+
resources:
61+
limits:
62+
cpu: 4000m
63+
memory: 4Gi
64+
requests:
65+
cpu: 100m
66+
memory: 512Mi
67+
```
68+
69+
Allowed values for `resourcesPreset` are `none`, `nano`, `micro`, `small`, `medium`, `large`, `xlarge`, `2xlarge`.
70+
This value is ignored if `resources` value is set.

‎packages/apps/clickhouse/values.schema.json‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
"properties": {
55
"size": {
66
"type": "string",
7-
"description": "Persistent Volume size",
7+
"description": "Size of Persistent Volume for data",
88
"default": "10Gi"
99
},
1010
"logStorageSize": {
1111
"type": "string",
12-
"description": "Persistent Volume for logs size",
12+
"description": "Size of Persistent Volume for logs",
1313
"default": "2Gi"
1414
},
1515
"shards": {
1616
"type": "number",
17-
"description": "Number of Clickhouse replicas",
17+
"description": "Number of Clickhouse shards",
1818
"default": 1
1919
},
2020
"replicas": {
2121
"type": "number",
22-
"description": "Number of Clickhouse shards",
22+
"description": "Number of Clickhouse replicas",
2323
"default": 2
2424
},
2525
"storageClass": {
@@ -29,25 +29,25 @@
2929
},
3030
"logTTL": {
3131
"type": "number",
32-
"description": "for query_log and query_thread_log",
32+
"description": "TTL (expiration time) for query_log and query_thread_log",
3333
"default": 15
3434
},
3535
"backup": {
3636
"type": "object",
3737
"properties": {
3838
"enabled": {
3939
"type": "boolean",
40-
"description": "Enable pereiodic backups",
40+
"description": "Enable periodic backups",
4141
"default": false
4242
},
4343
"s3Region": {
4444
"type": "string",
45-
"description": "The AWS S3 region where backups are stored",
45+
"description": "AWS S3 region where backups are stored",
4646
"default": "us-east-1"
4747
},
4848
"s3Bucket": {
4949
"type": "string",
50-
"description": "The S3 bucket used for storing backups",
50+
"description": "S3 bucket used for storing backups",
5151
"default": "s3.example.org/clickhouse-backups"
5252
},
5353
"schedule": {
@@ -57,34 +57,34 @@
5757
},
5858
"cleanupStrategy": {
5959
"type": "string",
60-
"description": "The strategy for cleaning up old backups",
60+
"description": "Retention strategy for cleaning up old backups",
6161
"default": "--keep-last=3 --keep-daily=3 --keep-within-weekly=1m"
6262
},
6363
"s3AccessKey": {
6464
"type": "string",
65-
"description": "The access key for S3, used for authentication",
65+
"description": "Access key for S3, used for authentication",
6666
"default": "oobaiRus9pah8PhohL1ThaeTa4UVa7gu"
6767
},
6868
"s3SecretKey": {
6969
"type": "string",
70-
"description": "The secret key for S3, used for authentication",
70+
"description": "Secret key for S3, used for authentication",
7171
"default": "ju3eum4dekeich9ahM1te8waeGai0oog"
7272
},
7373
"resticPassword": {
7474
"type": "string",
75-
"description": "The password for Restic backup encryption",
75+
"description": "Password for Restic backup encryption",
7676
"default": "ChaXoveekoh6eigh4siesheeda2quai0"
7777
}
7878
}
7979
},
8080
"resources": {
8181
"type": "object",
82-
"description": "Resources",
82+
"description": "Explicit CPU/memory resource requests and limits for the Clickhouse service",
8383
"default": {}
8484
},
8585
"resourcesPreset": {
8686
"type": "string",
87-
"description": "Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production).",
87+
"description": "Use a common resources preset when `resources` is not set explicitly.",
8888
"default": "nano"
8989
}
9090
}

‎packages/apps/clickhouse/values.yaml‎

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
## @section Common parameters
22

3-
## @param size Persistent Volume size
4-
## @param logStorageSize Persistent Volume for logs size
5-
## @param shards Number of Clickhouse replicas
6-
## @param replicas Number of Clickhouse shards
3+
## @param size Size of Persistent Volume for data
4+
## @param logStorageSize Size of Persistent Volume for logs
5+
## @param shards Number of Clickhouse shards
6+
## @param replicas Number of Clickhouse replicas
77
## @param storageClass StorageClass used to store the data
8-
## @param logTTL for query_log and query_thread_log
8+
## @param logTTL TTL (expiration time) for query_log and query_thread_log
99
##
1010
size: 10Gi
1111
logStorageSize: 2Gi
@@ -29,14 +29,14 @@ users: {}
2929

3030
## @section Backup parameters
3131

32-
## @param backup.enabled Enable pereiodic backups
33-
## @param backup.s3Region The AWS S3 region where backups are stored
34-
## @param backup.s3Bucket The S3 bucket used for storing backups
32+
## @param backup.enabled Enable periodic backups
33+
## @param backup.s3Region AWS S3 region where backups are stored
34+
## @param backup.s3Bucket S3 bucket used for storing backups
3535
## @param backup.schedule Cron schedule for automated backups
36-
## @param backup.cleanupStrategy The strategy for cleaning up old backups
37-
## @param backup.s3AccessKey The access key for S3, used for authentication
38-
## @param backup.s3SecretKey The secret key for S3, used for authentication
39-
## @param backup.resticPassword The password for Restic backup encryption
36+
## @param backup.cleanupStrategy Retention strategy for cleaning up old backups
37+
## @param backup.s3AccessKey Access key for S3, used for authentication
38+
## @param backup.s3SecretKey Secret key for S3, used for authentication
39+
## @param backup.resticPassword Password for Restic backup encryption
4040
backup:
4141
enabled: false
4242
s3Region: us-east-1
@@ -47,7 +47,7 @@ backup:
4747
s3SecretKey: ju3eum4dekeich9ahM1te8waeGai0oog
4848
resticPassword: ChaXoveekoh6eigh4siesheeda2quai0
4949

50-
## @param resources Resources
50+
## @param resources Explicit CPU/memory resource requests and limits for the Clickhouse service
5151
resources: {}
5252
# resources:
5353
# limits:
@@ -56,6 +56,6 @@ resources: {}
5656
# requests:
5757
# cpu: 100m
5858
# memory: 512Mi
59-
60-
## @param resourcesPreset Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if resources is set (resources is recommended for production).
59+
60+
## @param resourcesPreset Use a common resources preset when `resources` is not set explicitly.
6161
resourcesPreset: "nano"

0 commit comments

Comments
 (0)