From d48b5cfa2fc5b21e2a678bf9f7d3db1efbaebb83 Mon Sep 17 00:00:00 2001 From: Nick Volynkin Date: Mon, 4 Aug 2025 21:37:04 +0300 Subject: [PATCH 1/2] [apps] Use new OpenAPI schema and README generator for packages/extra Co-authored-by: Timofei Larkin Signed-off-by: Nick Volynkin --- packages/extra/bootbox/Makefile | 6 +- packages/extra/bootbox/README.md | 21 ++++- packages/extra/bootbox/values.schema.json | 98 +++++++++++++++++--- packages/extra/bootbox/values.yaml | 17 +++- packages/extra/etcd/Makefile | 2 +- packages/extra/etcd/README.md | 14 +-- packages/extra/etcd/values.schema.json | 76 ++++++++------- packages/extra/etcd/values.yaml | 12 +-- packages/extra/ingress/Makefile | 2 +- packages/extra/ingress/README.md | 11 ++- packages/extra/ingress/values.schema.json | 40 ++++---- packages/extra/ingress/values.yaml | 6 +- packages/extra/monitoring/README.md | 12 +-- packages/extra/monitoring/values.schema.json | 14 --- packages/extra/monitoring/values.yaml | 12 +-- packages/extra/seaweedfs/Makefile | 3 +- packages/extra/seaweedfs/README.md | 28 +++--- packages/extra/seaweedfs/values.schema.json | 76 ++++++++++----- packages/extra/seaweedfs/values.yaml | 24 +++-- 19 files changed, 297 insertions(+), 177 deletions(-) diff --git a/packages/extra/bootbox/Makefile b/packages/extra/bootbox/Makefile index c8138e11..f14160d1 100644 --- a/packages/extra/bootbox/Makefile +++ b/packages/extra/bootbox/Makefile @@ -4,8 +4,4 @@ NAMESPACE=tenant-root include ../../../scripts/package.mk generate: - readme-generator-for-helm -v values.yaml -s values.schema.json.tmp -r README.md - cat values.schema.json.tmp | \ - jq '.properties.machines.items.type = "object"' \ - > values.schema.json - rm -f values.schema.json.tmp + cozyvalues-gen -v values.yaml -s values.schema.json -r README.md diff --git a/packages/extra/bootbox/README.md b/packages/extra/bootbox/README.md index c3f25b32..6b8a19ff 100644 --- a/packages/extra/bootbox/README.md +++ b/packages/extra/bootbox/README.md @@ -4,8 +4,19 @@ ### Common parameters -| Name | Description | Value | -| --------------- | ----------------------------------------------------- | ------ | -| `whitelistHTTP` | Secure HTTP by enabling client networks whitelisting | `true` | -| `whitelist` | List of client networks | `[]` | -| `machines` | Configuration of physical machine instances | `[]` | +| Name | Description | Type | Value | +| ------------------------- | ---------------------------------------------------- | ----------- | ------- | +| `whitelistHTTP` | Secure HTTP by enabling client networks whitelisting | `bool` | `true` | +| `whitelist` | List of client networks | `[]*string` | `[]` | +| `machines` | Configuration of physical machine instances | `[]object` | `[]` | +| `machines[i].hostname` | Hostname | `string` | `""` | +| `machines[i].arch` | Architecture | `string` | `""` | +| `machines[i].ip.address` | IP address | `string` | `""` | +| `machines[i].ip.gateway` | IP gateway | `string` | `""` | +| `machines[i].ip.netmask` | Netmask | `string` | `""` | +| `machines[i].leaseTime` | Lease time | `int` | `0` | +| `machines[i].mac` | MAC addresses | `[]string` | `[]` | +| `machines[i].nameServers` | Name servers | `[]string` | `[]` | +| `machines[i].timeServers` | Time servers | `[]string` | `[]` | +| `machines[i].uefi` | UEFI | `bool` | `false` | + diff --git a/packages/extra/bootbox/values.schema.json b/packages/extra/bootbox/values.schema.json index c62c6c01..0afa8d36 100644 --- a/packages/extra/bootbox/values.schema.json +++ b/packages/extra/bootbox/values.schema.json @@ -1,25 +1,95 @@ { + "title": "Chart Values", + "type": "object", "properties": { "machines": { - "default": [], "description": "Configuration of physical machine instances", + "type": "array", + "default": [], "items": { - "type": "object" - }, - "type": "array" + "type": "object", + "required": [ + "arch", + "hostname", + "ip", + "leaseTime", + "uefi" + ], + "properties": { + "arch": { + "description": "Architecture", + "type": "string" + }, + "hostname": { + "description": "Hostname", + "type": "string" + }, + "ip": { + "type": "object", + "required": [ + "address", + "gateway", + "netmask" + ], + "properties": { + "address": { + "description": "IP address", + "type": "string" + }, + "gateway": { + "description": "IP gateway", + "type": "string" + }, + "netmask": { + "description": "Netmask", + "type": "string" + } + } + }, + "leaseTime": { + "description": "Lease time", + "type": "integer" + }, + "mac": { + "description": "MAC addresses", + "type": "array", + "items": { + "type": "string" + } + }, + "nameServers": { + "description": "Name servers", + "type": "array", + "items": { + "type": "string" + } + }, + "timeServers": { + "description": "Time servers", + "type": "array", + "items": { + "type": "string" + } + }, + "uefi": { + "description": "UEFI", + "type": "boolean" + } + } + } }, "whitelist": { - "default": [], "description": "List of client networks", - "items": {}, - "type": "array" + "type": "array", + "default": [], + "items": { + "type": "string" + } }, "whitelistHTTP": { - "default": true, - "description": "Secure HTTP by enabling client networks whitelisting", - "type": "boolean" + "description": "Secure HTTP by enabling client networks whitelisting", + "type": "boolean", + "default": true } - }, - "title": "Chart Values", - "type": "object" -} + } +} \ No newline at end of file diff --git a/packages/extra/bootbox/values.yaml b/packages/extra/bootbox/values.yaml index f4d55572..88fa30ed 100644 --- a/packages/extra/bootbox/values.yaml +++ b/packages/extra/bootbox/values.yaml @@ -1,7 +1,7 @@ ## @section Common parameters -## @param whitelistHTTP Secure HTTP by enabling client networks whitelisting -## @param whitelist List of client networks +## @param whitelistHTTP {bool} Secure HTTP by enabling client networks whitelisting +## @param whitelist {[]*string} List of client networks ## Example: ## whitelistHTTP: true ## whitelist: @@ -11,7 +11,18 @@ whitelistHTTP: true whitelist: [] -## @param machines [array] Configuration of physical machine instances +## @param machines {[]machine} Configuration of physical machine instances +## @field machine {machine} Machine configuration +## @field machine.hostname {string} Hostname +## @field machine.arch {string} Architecture +## @field machine.ip.address {string} IP address +## @field machine.ip.gateway {string} IP gateway +## @field machine.ip.netmask {string} Netmask +## @field machine.leaseTime {int} Lease time +## @field machine.mac {[]string} MAC addresses +## @field machine.nameServers {[]string} Name servers +## @field machine.timeServers {[]string} Time servers +## @field machine.uefi {bool} UEFI ## ## Example: ## machines: diff --git a/packages/extra/etcd/Makefile b/packages/extra/etcd/Makefile index 75a9b220..8b8a0a99 100644 --- a/packages/extra/etcd/Makefile +++ b/packages/extra/etcd/Makefile @@ -3,4 +3,4 @@ NAME=etcd include ../../../scripts/package.mk generate: - readme-generator-for-helm -v values.yaml -s values.schema.json -r README.md + cozyvalues-gen -v values.yaml -s values.schema.json -r README.md diff --git a/packages/extra/etcd/README.md b/packages/extra/etcd/README.md index 47f952fb..f87cd8ae 100644 --- a/packages/extra/etcd/README.md +++ b/packages/extra/etcd/README.md @@ -4,10 +4,10 @@ ### Common parameters -| Name | Description | Value | -| ------------------ | ----------------------------------- | ----- | -| `size` | Persistent Volume size | `4Gi` | -| `storageClass` | StorageClass used to store the data | `""` | -| `replicas` | Number of etcd replicas | `3` | -| `resources.cpu` | The number of CPU cores allocated | `4` | -| `resources.memory` | The amount of memory allocated | `1Gi` | +| Name | Description | Type | Value | +| -------------- | ----------------------------------- | --------- | -------------------------- | +| `size` | Persistent Volume size | `*string` | `4Gi` | +| `storageClass` | StorageClass used to store the data | `*string` | `""` | +| `replicas` | Number of etcd replicas | `*int` | `3` | +| `resources` | Resource configuration for etcd | `*object` | `{"cpu":4,"memory":"1Gi"}` | + diff --git a/packages/extra/etcd/values.schema.json b/packages/extra/etcd/values.schema.json index b2214b10..c5581556 100644 --- a/packages/extra/etcd/values.schema.json +++ b/packages/extra/etcd/values.schema.json @@ -1,36 +1,46 @@ { - "properties": { - "replicas": { - "default": 3, - "description": "Number of etcd replicas", - "type": "number" - }, - "resources": { - "properties": { - "cpu": { - "default": 4, - "description": "The number of CPU cores allocated", - "type": "number" - }, - "memory": { - "default": "1Gi", - "description": "The amount of memory allocated", - "type": "string" - } - }, - "type": "object" - }, - "size": { - "default": "4Gi", - "description": "Persistent Volume size", - "type": "string" - }, - "storageClass": { - "default": "", - "description": "StorageClass used to store the data", - "type": "string" - } + "title": "Chart Values", + "type": "object", + "properties": { + "replicas": { + "description": "Number of etcd replicas", + "type": "integer", + "default": 3 }, - "title": "Chart Values", - "type": "object" + "resources": { + "description": "Resource configuration for etcd", + "type": "object", + "default": { + "cpu": 4, + "memory": "1Gi" + }, + "properties": { + "cpu": { + "description": "The number of CPU cores allocated", + "type": "string", + "default": "4", + "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "x-kubernetes-int-or-string": true + }, + "memory": { + "description": "The amount of memory allocated", + "type": "string", + "default": "1Gi", + "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "x-kubernetes-int-or-string": true + } + } + }, + "size": { + "description": "Persistent Volume size", + "type": "string", + "default": "4Gi", + "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "x-kubernetes-int-or-string": true + }, + "storageClass": { + "description": "StorageClass used to store the data", + "type": "string" + } + } } \ No newline at end of file diff --git a/packages/extra/etcd/values.yaml b/packages/extra/etcd/values.yaml index f9a147f9..cb3225b0 100644 --- a/packages/extra/etcd/values.yaml +++ b/packages/extra/etcd/values.yaml @@ -1,16 +1,16 @@ ## @section Common parameters -## @param size Persistent Volume size -## @param storageClass StorageClass used to store the data -## @param replicas Number of etcd replicas +## @param size {*quantity} Persistent Volume size +## @param storageClass {*string} StorageClass used to store the data +## @param replicas {*int} Number of etcd replicas ## size: 4Gi storageClass: "" replicas: 3 -## Resources -## @param resources.cpu The number of CPU cores allocated -## @param resources.memory The amount of memory allocated +## @param resources {*resources} Resource configuration for etcd +## @param resources.cpu {*quantity} The number of CPU cores allocated +## @param resources.memory {*quantity} The amount of memory allocated resources: cpu: 4 memory: 1Gi diff --git a/packages/extra/ingress/Makefile b/packages/extra/ingress/Makefile index 6d58669f..4b78cd6d 100644 --- a/packages/extra/ingress/Makefile +++ b/packages/extra/ingress/Makefile @@ -8,4 +8,4 @@ get-cloudflare-ips: printf '{{- define "ingress.cloudflare-ips" -}}\n%s,%s\n{{- end }}\n' "$$(curl -s https://www.cloudflare.com/ips-v4/ | tr '\n' ,)" "$$(curl -s https://www.cloudflare.com/ips-v6/ | tr '\n' ,)" > templates/_cloudflare-ips.tpl generate: - readme-generator-for-helm -v values.yaml -s values.schema.json -r README.md + cozyvalues-gen -v values.yaml -s values.schema.json -r README.md diff --git a/packages/extra/ingress/README.md b/packages/extra/ingress/README.md index 258b5a6a..640fc9da 100644 --- a/packages/extra/ingress/README.md +++ b/packages/extra/ingress/README.md @@ -4,8 +4,9 @@ ### Common parameters -| Name | Description | Value | -| ---------------- | ----------------------------------------------------------------- | ------- | -| `replicas` | Number of ingress-nginx replicas | `2` | -| `whitelist` | List of client networks | `[]` | -| `clouflareProxy` | Restoring original visitor IPs when Cloudflare proxied is enabled | `false` | +| Name | Description | Type | Value | +| ---------------- | ----------------------------------------------------------------- | ----------- | ------- | +| `replicas` | Number of ingress-nginx replicas | `int` | `2` | +| `whitelist` | List of client networks | `[]*string` | `[]` | +| `clouflareProxy` | Restoring original visitor IPs when Cloudflare proxied is enabled | `bool` | `false` | + diff --git a/packages/extra/ingress/values.schema.json b/packages/extra/ingress/values.schema.json index 04cd22bc..2c942cba 100644 --- a/packages/extra/ingress/values.schema.json +++ b/packages/extra/ingress/values.schema.json @@ -1,22 +1,24 @@ { - "properties": { - "clouflareProxy": { - "default": false, - "description": "Restoring original visitor IPs when Cloudflare proxied is enabled", - "type": "boolean" - }, - "replicas": { - "default": 2, - "description": "Number of ingress-nginx replicas", - "type": "number" - }, - "whitelist": { - "default": [], - "description": "List of client networks", - "items": {}, - "type": "array" - } + "title": "Chart Values", + "type": "object", + "properties": { + "clouflareProxy": { + "description": "Restoring original visitor IPs when Cloudflare proxied is enabled", + "type": "boolean", + "default": false }, - "title": "Chart Values", - "type": "object" + "replicas": { + "description": "Number of ingress-nginx replicas", + "type": "integer", + "default": 2 + }, + "whitelist": { + "description": "List of client networks", + "type": "array", + "default": [], + "items": { + "type": "string" + } + } + } } \ No newline at end of file diff --git a/packages/extra/ingress/values.yaml b/packages/extra/ingress/values.yaml index a5cee834..09be0141 100644 --- a/packages/extra/ingress/values.yaml +++ b/packages/extra/ingress/values.yaml @@ -1,15 +1,15 @@ ## @section Common parameters -## @param replicas Number of ingress-nginx replicas +## @param replicas {int} Number of ingress-nginx replicas ## replicas: 2 -## @param whitelist List of client networks +## @param whitelist {[]*string} List of client networks ## Example: ## whitelist: ## - "1.2.3.4" ## - "10.100.0.0/16" whitelist: [] -## @param clouflareProxy Restoring original visitor IPs when Cloudflare proxied is enabled +## @param clouflareProxy {bool} Restoring original visitor IPs when Cloudflare proxied is enabled clouflareProxy: false diff --git a/packages/extra/monitoring/README.md b/packages/extra/monitoring/README.md index 7bf4b646..40933c7d 100644 --- a/packages/extra/monitoring/README.md +++ b/packages/extra/monitoring/README.md @@ -58,8 +58,8 @@ | Name | Description | Type | Value | | ----------------------------------------- | ----------------------------------------------------------------------------------- | --------- | ------- | | `alerta` | Configuration for Alerta service | `object` | `{}` | -| `alerta.storage` | Persistent Volume size for the database | `string` | `10Gi` | -| `alerta.storageClassName` | StorageClass used to store the data | `string` | `""` | +| `alerta.storage` | Persistent Volume size for the database | `*string` | `10Gi` | +| `alerta.storageClassName` | StorageClass used to store the data | `*string` | `""` | | `alerta.resources` | Resources configuration | `*object` | `null` | | `alerta.resources.requests` | | `*object` | `null` | | `alerta.resources.requests.cpu` | CPU request (minimum available CPU) | `*string` | `100m` | @@ -67,8 +67,8 @@ | `alerta.resources.limits` | | `*object` | `null` | | `alerta.resources.limits.cpu` | CPU limit (maximum available CPU) | `*string` | `1` | | `alerta.resources.limits.memory` | Memory limit (maximum available memory) | `*string` | `1Gi` | -| `alerta.alerts` | Configuration for alerts | `object` | `{}` | -| `alerta.alerts.telegram` | Configuration for Telegram alerts | `object` | `{}` | +| `alerta.alerts` | Configuration for alerts | `*object` | `null` | +| `alerta.alerts.telegram` | Configuration for Telegram alerts | `*object` | `null` | | `alerta.alerts.telegram.token` | Telegram token for your bot | `string` | `""` | | `alerta.alerts.telegram.chatID` | Specify multiple ID's separated by comma. Get yours in https://t.me/chatid_echo_bot | `string` | `""` | | `alerta.alerts.telegram.disabledSeverity` | List of severity without alerts, separated by comma like: "informational,warning" | `string` | `""` | @@ -79,8 +79,8 @@ | Name | Description | Type | Value | | ----------------------------------- | ----------------------------------------- | --------- | ------- | | `grafana` | Configuration for Grafana | `object` | `{}` | -| `grafana.db` | Database configuration | `object` | `{}` | -| `grafana.db.size` | Persistent Volume size for the database | `string` | `10Gi` | +| `grafana.db` | Database configuration | `*object` | `null` | +| `grafana.db.size` | Persistent Volume size for the database | `*string` | `10Gi` | | `grafana.resources` | Resources configuration | `*object` | `null` | | `grafana.resources.requests` | | `*object` | `null` | | `grafana.resources.requests.cpu` | CPU request (minimum available CPU) | `*string` | `100m` | diff --git a/packages/extra/monitoring/values.schema.json b/packages/extra/monitoring/values.schema.json index ae807aa8..2762324e 100644 --- a/packages/extra/monitoring/values.schema.json +++ b/packages/extra/monitoring/values.schema.json @@ -26,11 +26,6 @@ "storage": "10Gi", "storageClassName": "" }, - "required": [ - "alerts", - "storage", - "storageClassName" - ], "properties": { "alerts": { "description": "Configuration for alerts", @@ -42,9 +37,6 @@ "token": "" } }, - "required": [ - "telegram" - ], "properties": { "telegram": { "description": "Configuration for Telegram alerts", @@ -167,9 +159,6 @@ } } }, - "required": [ - "db" - ], "properties": { "db": { "description": "Database configuration", @@ -177,9 +166,6 @@ "default": { "size": "10Gi" }, - "required": [ - "size" - ], "properties": { "size": { "description": "Persistent Volume size for the database", diff --git a/packages/extra/monitoring/values.yaml b/packages/extra/monitoring/values.yaml index f507ba05..bfc0321b 100644 --- a/packages/extra/monitoring/values.yaml +++ b/packages/extra/monitoring/values.yaml @@ -82,11 +82,11 @@ logsStorages: ## @section Alerta configuration ## @param alerta {alerta} Configuration for Alerta service -## @field alerta.storage {string} Persistent Volume size for the database -## @field alerta.storageClassName {string} StorageClass used to store the data +## @field alerta.storage {*string} Persistent Volume size for the database +## @field alerta.storageClassName {*string} StorageClass used to store the data ## @field alerta.resources {*resources} Resources configuration -## @field alerta.alerts {alerts} Configuration for alerts -## @field alerts.telegram {telegramAlerts} Configuration for Telegram alerts +## @field alerta.alerts {*alerts} Configuration for alerts +## @field alerts.telegram {*telegramAlerts} Configuration for Telegram alerts ## @field telegramAlerts.token {string} Telegram token for your bot ## @field telegramAlerts.chatID {string} Specify multiple ID's separated by comma. Get yours in https://t.me/chatid_echo_bot ## @field telegramAlerts.disabledSeverity {string} List of severity without alerts, separated by comma like: "informational,warning" @@ -115,8 +115,8 @@ alerta: ## @section Grafana configuration ## @param grafana {grafana} Configuration for Grafana -## @field grafana.db {grafanaDB} Database configuration -## @field grafanaDB.size {string} Persistent Volume size for the database +## @field grafana.db {*grafanaDB} Database configuration +## @field grafanaDB.size {*string} Persistent Volume size for the database ## @field grafana.resources {*resources} Resources configuration diff --git a/packages/extra/seaweedfs/Makefile b/packages/extra/seaweedfs/Makefile index 78e21e04..ffa23d90 100644 --- a/packages/extra/seaweedfs/Makefile +++ b/packages/extra/seaweedfs/Makefile @@ -3,5 +3,4 @@ NAME=seaweedfs include ../../../scripts/package.mk generate: - readme-generator-for-helm -v values.yaml -s values.schema.json -r README.md - yq -o json -i '.properties.topology.enum = ["Simple","MultiZone","Client"]' values.schema.json + cozyvalues-gen -v values.yaml -s values.schema.json -r README.md diff --git a/packages/extra/seaweedfs/README.md b/packages/extra/seaweedfs/README.md index aea13939..96a2ed17 100644 --- a/packages/extra/seaweedfs/README.md +++ b/packages/extra/seaweedfs/README.md @@ -4,15 +4,19 @@ ### Common parameters -| Name | Description | Value | -| ------------------- | ------------------------------------------------------------------------------------------------------ | -------- | -| `host` | The hostname used to access the SeaweedFS externally (defaults to 's3' subdomain for the tenant host). | `""` | -| `topology` | The topology of the SeaweedFS cluster. (allowed values: Simple, MultiZone, Client) | `Simple` | -| `replicationFactor` | The number of replicas for each volume in the SeaweedFS cluster. | `2` | -| `replicas` | Persistent Volume size for SeaweedFS | `2` | -| `size` | Persistent Volume size | `10Gi` | -| `storageClass` | StorageClass used to store the data | `""` | -| `zones` | A map of zones for MultiZone topology. Each zone can have its own number of replicas and size. | `{}` | -| `filer.grpcHost` | The hostname used to expose or access the filer service externally. | `""` | -| `filer.grpcPort` | The port used to access the filer service externally. | `443` | -| `filer.whitelist` | A list of IP addresses or CIDR ranges that are allowed to access the filer service. | `[]` | +| Name | Description | Type | Value | +| ---------------------- | ------------------------------------------------------------------------------------------------------ | ------------------- | ----------------------------------------------- | +| `host` | The hostname used to access the SeaweedFS externally (defaults to 's3' subdomain for the tenant host). | `*string` | `""` | +| `topology` | The topology of the SeaweedFS cluster. (allowed values: Simple, MultiZone, Client) | `string` | `{}` | +| `replicationFactor` | Replication factor: number of replicas for each volume in the SeaweedFS cluster. | `int` | `2` | +| `replicas` | Number of replicas | `int` | `2` | +| `size` | Persistent Volume size | `string` | `10Gi` | +| `storageClass` | StorageClass used to store the data | `*string` | `""` | +| `zones` | A map of zones for MultiZone topology. Each zone can have its own number of replicas and size. | `map[string]object` | `{...}` | +| `zones[name].replicas` | Number of replicas in the zone | `int` | `0` | +| `zones[name].size` | Zone storage size | `string` | `""` | +| `filer` | Filer service configuration | `*object` | `{"grpcHost":"","grpcPort":443,"whitelist":[]}` | +| `filer.grpcHost` | The hostname used to expose or access the filer service externally. | `*string` | `""` | +| `filer.grpcPort` | The port used to access the filer service externally. | `*int` | `443` | +| `filer.whitelist` | A list of IP addresses or CIDR ranges that are allowed to access the filer service. | `[]*string` | `[]` | + diff --git a/packages/extra/seaweedfs/values.schema.json b/packages/extra/seaweedfs/values.schema.json index e822eda0..24cce446 100644 --- a/packages/extra/seaweedfs/values.schema.json +++ b/packages/extra/seaweedfs/values.schema.json @@ -1,55 +1,64 @@ { + "title": "Chart Values", + "type": "object", "properties": { "filer": { + "description": "Filer service configuration", + "type": "object", + "default": { + "grpcHost": "", + "grpcPort": 443, + "whitelist": {} + }, "properties": { "grpcHost": { - "default": "", "description": "The hostname used to expose or access the filer service externally.", "type": "string" }, "grpcPort": { - "default": 443, "description": "The port used to access the filer service externally.", - "type": "number" + "type": "integer", + "default": 443 }, "whitelist": { - "default": [], "description": "A list of IP addresses or CIDR ranges that are allowed to access the filer service.", - "items": {}, - "type": "array" + "type": "array", + "default": [], + "items": { + "type": "string" + } } - }, - "type": "object" + } }, "host": { - "default": "", "description": "The hostname used to access the SeaweedFS externally (defaults to 's3' subdomain for the tenant host).", "type": "string" }, "replicas": { - "default": 2, - "description": "Persistent Volume size for SeaweedFS", - "type": "number" + "description": "Number of replicas", + "type": "integer", + "default": 2 }, "replicationFactor": { - "default": 2, - "description": "The number of replicas for each volume in the SeaweedFS cluster.", - "type": "number" + "description": "Replication factor: number of replicas for each volume in the SeaweedFS cluster.", + "type": "integer", + "default": 2 }, "size": { - "default": "10Gi", "description": "Persistent Volume size", - "type": "string" + "type": "string", + "default": "10Gi", + "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "x-kubernetes-int-or-string": true }, "storageClass": { - "default": "", "description": "StorageClass used to store the data", "type": "string" }, "topology": { - "default": "Simple", "description": "The topology of the SeaweedFS cluster. (allowed values: Simple, MultiZone, Client)", "type": "string", + "default": "Simple", "enum": [ "Simple", "MultiZone", @@ -57,11 +66,28 @@ ] }, "zones": { - "default": {}, "description": "A map of zones for MultiZone topology. Each zone can have its own number of replicas and size.", - "type": "object" + "type": "object", + "default": {}, + "additionalProperties": { + "type": "object", + "required": [ + "replicas", + "size" + ], + "properties": { + "replicas": { + "description": "Number of replicas in the zone", + "type": "integer" + }, + "size": { + "description": "Zone storage size", + "type": "string", + "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "x-kubernetes-int-or-string": true + } + } + } } - }, - "title": "Chart Values", - "type": "object" -} + } +} \ No newline at end of file diff --git a/packages/extra/seaweedfs/values.yaml b/packages/extra/seaweedfs/values.yaml index c1f73a53..40f33d1b 100644 --- a/packages/extra/seaweedfs/values.yaml +++ b/packages/extra/seaweedfs/values.yaml @@ -1,24 +1,26 @@ ## @section Common parameters -## @param host The hostname used to access the SeaweedFS externally (defaults to 's3' subdomain for the tenant host). +## @param host {*string} The hostname used to access the SeaweedFS externally (defaults to 's3' subdomain for the tenant host). host: "" -## @param topology The topology of the SeaweedFS cluster. (allowed values: Simple, MultiZone, Client) +## @param topology {string enum:"Simple,MultiZone,Client"} The topology of the SeaweedFS cluster. (allowed values: Simple, MultiZone, Client) ## topology: Simple -## @param replicationFactor The number of replicas for each volume in the SeaweedFS cluster. +## @param replicationFactor {int} Replication factor: number of replicas for each volume in the SeaweedFS cluster. replicationFactor: 2 -## @param replicas Persistent Volume size for SeaweedFS -## @param size Persistent Volume size -## @param storageClass StorageClass used to store the data +## @param replicas {int} Number of replicas ## replicas: 2 +## @param size {quantity} Persistent Volume size size: 10Gi +## @param storageClass {*string} StorageClass used to store the data storageClass: "" -## @param zones A map of zones for MultiZone topology. Each zone can have its own number of replicas and size. +## @param zones {map[string]zone} A map of zones for MultiZone topology. Each zone can have its own number of replicas and size. +## @field zone.replicas {int} Number of replicas in the zone +## @field zone.size {quantity} Zone storage size ## Example: ## zones: ## dc1: @@ -32,9 +34,11 @@ storageClass: "" ## size: 10Gi zones: {} -## @param filer.grpcHost The hostname used to expose or access the filer service externally. -## @param filer.grpcPort The port used to access the filer service externally. -## @param filer.whitelist A list of IP addresses or CIDR ranges that are allowed to access the filer service. +## @param filer {*filer} Filer service configuration +## @field filer.grpcHost {*string} The hostname used to expose or access the filer service externally. +## @field filer.grpcPort {*int} The port used to access the filer service externally. +## TODO: select a more appropriate type after resolving https://github.com/cozystack/cozyvalues-gen/issues/4 +## @field filer.whitelist {[]*string} A list of IP addresses or CIDR ranges that are allowed to access the filer service. filer: grpcHost: "" grpcPort: 443 From 5359c6d9917ba1062f9071f30c96c51e0b9d82bc Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Thu, 7 Aug 2025 23:36:10 +0200 Subject: [PATCH 2/2] Update cozyvalues-gen Signed-off-by: Andrei Kvapil --- .github/workflows/pre-commit.yml | 2 +- packages/apps/postgres/README.md | 20 +- packages/apps/postgres/values.schema.json | 27 ++- packages/apps/tenant/README.md | 18 +- packages/apps/tenant/values.schema.json | 9 +- packages/apps/virtual-machine/README.md | 42 ++-- .../apps/virtual-machine/values.schema.json | 27 ++- packages/extra/bootbox/README.md | 31 +-- packages/extra/bootbox/values.schema.json | 33 +-- packages/extra/bootbox/values.yaml | 9 +- packages/extra/etcd/README.md | 12 +- packages/extra/etcd/values.schema.json | 29 ++- packages/extra/monitoring/README.md | 116 +++++------ packages/extra/monitoring/values.schema.json | 190 +++++++++++++++--- packages/extra/seaweedfs/README.md | 30 +-- packages/extra/seaweedfs/values.schema.json | 18 +- 16 files changed, 424 insertions(+), 189 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index e00fe0d7..68a03630 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -29,7 +29,7 @@ jobs: - name: Install generate run: | curl -sSL https://github.com/cozystack/readme-generator-for-helm/releases/download/v1.0.0/readme-generator-for-helm-linux-amd64.tar.gz | tar -xzvf- -C /usr/local/bin/ readme-generator-for-helm - curl -sSL https://github.com/cozystack/cozyvalues-gen/releases/download/v0.7.0/cozyvalues-gen-linux-amd64.tar.gz | tar -xzvf- -C /usr/local/bin/ cozyvalues-gen + curl -sSL https://github.com/cozystack/cozyvalues-gen/releases/download/v0.8.1/cozyvalues-gen-linux-amd64.tar.gz | tar -xzvf- -C /usr/local/bin/ cozyvalues-gen - name: Run pre-commit hooks run: | diff --git a/packages/apps/postgres/README.md b/packages/apps/postgres/README.md index c9cda3c3..34096f49 100644 --- a/packages/apps/postgres/README.md +++ b/packages/apps/postgres/README.md @@ -66,16 +66,16 @@ See: ### Common parameters -| Name | Description | Type | Value | -| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | --------- | ------- | -| `replicas` | Number of Postgres replicas | `int` | `2` | -| `resources` | Explicit CPU and memory configuration for each PostgreSQL replica. When left empty, the preset defined in `resourcesPreset` is applied. | `*object` | `{}` | -| `resources.cpu` | CPU | `*string` | `null` | -| `resources.memory` | Memory | `*string` | `null` | -| `resourcesPreset` | Default sizing preset used when `resources` is omitted. Allowed values: `nano`, `micro`, `small`, `medium`, `large`, `xlarge`, `2xlarge`. | `string` | `{}` | -| `size` | Persistent Volume Claim size, available for application data | `string` | `10Gi` | -| `storageClass` | StorageClass used to store the data | `string` | `""` | -| `external` | Enable external access from outside the cluster | `bool` | `false` | +| Name | Description | Type | Value | +| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ------- | +| `replicas` | Number of Postgres replicas | `int` | `2` | +| `resources` | Explicit CPU and memory configuration for each PostgreSQL replica. When left empty, the preset defined in `resourcesPreset` is applied. | `*object` | `{}` | +| `resources.cpu` | CPU | `*quantity` | `null` | +| `resources.memory` | Memory | `*quantity` | `null` | +| `resourcesPreset` | Default sizing preset used when `resources` is omitted. Allowed values: `nano`, `micro`, `small`, `medium`, `large`, `xlarge`, `2xlarge`. | `string` | `micro` | +| `size` | Persistent Volume Claim size, available for application data | `quantity` | `10Gi` | +| `storageClass` | StorageClass used to store the data | `string` | `""` | +| `external` | Enable external access from outside the cluster | `bool` | `false` | ### Application-specific parameters diff --git a/packages/apps/postgres/values.schema.json b/packages/apps/postgres/values.schema.json index 9ba39ebc..b280557f 100644 --- a/packages/apps/postgres/values.schema.json +++ b/packages/apps/postgres/values.schema.json @@ -198,14 +198,28 @@ "properties": { "cpu": { "description": "CPU", - "type": "string", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true }, "memory": { "description": "Memory", - "type": "string", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true } } @@ -226,9 +240,16 @@ }, "size": { "description": "Persistent Volume Claim size, available for application data", - "type": "string", "default": "10Gi", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true }, "storageClass": { diff --git a/packages/apps/tenant/README.md b/packages/apps/tenant/README.md index 5526c146..3d53b466 100644 --- a/packages/apps/tenant/README.md +++ b/packages/apps/tenant/README.md @@ -69,13 +69,13 @@ tenant-u1 ### Common parameters -| Name | Description | Type | Value | -| ---------------- | --------------------------------------------------------------------------------------------------------------------------- | --------- | ------- | -| `host` | The hostname used to access tenant services (defaults to using the tenant name as a subdomain for it's parent tenant host). | `*string` | `""` | -| `etcd` | Deploy own Etcd cluster | `bool` | `false` | -| `monitoring` | Deploy own Monitoring Stack | `bool` | `false` | -| `ingress` | Deploy own Ingress Controller | `bool` | `false` | -| `seaweedfs` | Deploy own SeaweedFS | `bool` | `false` | -| `isolated` | Enforce tenant namespace with network policies, `true` by default | `bool` | `true` | -| `resourceQuotas` | Define resource quotas for the tenant | `string` | `{}` | +| Name | Description | Type | Value | +| ---------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------- | ------- | +| `host` | The hostname used to access tenant services (defaults to using the tenant name as a subdomain for it's parent tenant host). | `*string` | `""` | +| `etcd` | Deploy own Etcd cluster | `bool` | `false` | +| `monitoring` | Deploy own Monitoring Stack | `bool` | `false` | +| `ingress` | Deploy own Ingress Controller | `bool` | `false` | +| `seaweedfs` | Deploy own SeaweedFS | `bool` | `false` | +| `isolated` | Enforce tenant namespace with network policies, `true` by default | `bool` | `true` | +| `resourceQuotas` | Define resource quotas for the tenant | `map[string]quantity` | `{}` | diff --git a/packages/apps/tenant/values.schema.json b/packages/apps/tenant/values.schema.json index 6e89ae6d..1a5b8567 100644 --- a/packages/apps/tenant/values.schema.json +++ b/packages/apps/tenant/values.schema.json @@ -31,8 +31,15 @@ "type": "object", "default": {}, "additionalProperties": { - "type": "string", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true } }, diff --git a/packages/apps/virtual-machine/README.md b/packages/apps/virtual-machine/README.md index 6ed30826..3c9f05ae 100644 --- a/packages/apps/virtual-machine/README.md +++ b/packages/apps/virtual-machine/README.md @@ -36,27 +36,27 @@ virtctl ssh @ ### Common parameters -| Name | Description | Type | Value | -| ------------------------- | ----------------------------------------------------------------------------------------------------------- | ---------- | ------------ | -| `external` | Enable external access from outside the cluster | `bool` | `false` | -| `externalMethod` | Specify method to pass through the traffic to the virtual machine. Allowed values: `WholeIP` and `PortList` | `string` | `{}` | -| `externalPorts` | Specify ports to forward from outside the cluster | `[]int` | `[22]` | -| `running` | if the virtual machine should be running | `bool` | `true` | -| `instanceType` | Virtual Machine instance type | `string` | `u1.medium` | -| `instanceProfile` | Virtual Machine preferences profile | `string` | `ubuntu` | -| `systemDisk` | System disk configuration | `object` | `{}` | -| `systemDisk.image` | The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine`, `fedora` and `talos` | `string` | `ubuntu` | -| `systemDisk.storage` | The size of the disk allocated for the virtual machine | `string` | `5Gi` | -| `systemDisk.storageClass` | StorageClass used to store the data | `*string` | `replicated` | -| `gpus` | List of GPUs to attach | `[]object` | `[]` | -| `gpus[i].name` | The name of the GPU to attach. This should match the GPU resource name in the cluster. | `string` | `""` | -| `resources` | Resources | `object` | `{}` | -| `resources.cpu` | The number of CPU cores allocated to the virtual machine | `*string` | `null` | -| `resources.sockets` | The number of CPU sockets allocated to the virtual machine (used to define vCPU topology) | `*string` | `null` | -| `resources.memory` | The amount of memory allocated to the virtual machine | `*string` | `null` | -| `sshKeys` | List of SSH public keys for authentication. Can be a single key or a list of keys. | `[]string` | `[]` | -| `cloudInit` | cloud-init user data config. See cloud-init documentation for more details. | `string` | `""` | -| `cloudInitSeed` | A seed string to generate an SMBIOS UUID for the VM. | `string` | `""` | +| Name | Description | Type | Value | +| ------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------- | ------------ | +| `external` | Enable external access from outside the cluster | `bool` | `false` | +| `externalMethod` | Specify method to pass through the traffic to the virtual machine. Allowed values: `WholeIP` and `PortList` | `string` | `PortList` | +| `externalPorts` | Specify ports to forward from outside the cluster | `[]int` | `[22]` | +| `running` | if the virtual machine should be running | `bool` | `true` | +| `instanceType` | Virtual Machine instance type | `string` | `u1.medium` | +| `instanceProfile` | Virtual Machine preferences profile | `string` | `ubuntu` | +| `systemDisk` | System disk configuration | `object` | `{}` | +| `systemDisk.image` | The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine`, `fedora` and `talos` | `string` | `ubuntu` | +| `systemDisk.storage` | The size of the disk allocated for the virtual machine | `string` | `5Gi` | +| `systemDisk.storageClass` | StorageClass used to store the data | `*string` | `replicated` | +| `gpus` | List of GPUs to attach | `[]object` | `[]` | +| `gpus[i].name` | The name of the GPU to attach. This should match the GPU resource name in the cluster. | `string` | `""` | +| `resources` | Resources | `object` | `{}` | +| `resources.cpu` | The number of CPU cores allocated to the virtual machine | `*quantity` | `null` | +| `resources.sockets` | The number of CPU sockets allocated to the virtual machine (used to define vCPU topology) | `*quantity` | `null` | +| `resources.memory` | The amount of memory allocated to the virtual machine | `*quantity` | `null` | +| `sshKeys` | List of SSH public keys for authentication. Can be a single key or a list of keys. | `[]string` | `[]` | +| `cloudInit` | cloud-init user data config. See cloud-init documentation for more details. | `string` | `""` | +| `cloudInitSeed` | A seed string to generate an SMBIOS UUID for the VM. | `string` | `""` | ## U Series diff --git a/packages/apps/virtual-machine/values.schema.json b/packages/apps/virtual-machine/values.schema.json index 999d60d6..8df250fc 100644 --- a/packages/apps/virtual-machine/values.schema.json +++ b/packages/apps/virtual-machine/values.schema.json @@ -113,20 +113,41 @@ "properties": { "cpu": { "description": "The number of CPU cores allocated to the virtual machine", - "type": "string", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true }, "memory": { "description": "The amount of memory allocated to the virtual machine", - "type": "string", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true }, "sockets": { "description": "The number of CPU sockets allocated to the virtual machine (used to define vCPU topology)", - "type": "string", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true } } diff --git a/packages/extra/bootbox/README.md b/packages/extra/bootbox/README.md index 6b8a19ff..a094b66f 100644 --- a/packages/extra/bootbox/README.md +++ b/packages/extra/bootbox/README.md @@ -4,19 +4,20 @@ ### Common parameters -| Name | Description | Type | Value | -| ------------------------- | ---------------------------------------------------- | ----------- | ------- | -| `whitelistHTTP` | Secure HTTP by enabling client networks whitelisting | `bool` | `true` | -| `whitelist` | List of client networks | `[]*string` | `[]` | -| `machines` | Configuration of physical machine instances | `[]object` | `[]` | -| `machines[i].hostname` | Hostname | `string` | `""` | -| `machines[i].arch` | Architecture | `string` | `""` | -| `machines[i].ip.address` | IP address | `string` | `""` | -| `machines[i].ip.gateway` | IP gateway | `string` | `""` | -| `machines[i].ip.netmask` | Netmask | `string` | `""` | -| `machines[i].leaseTime` | Lease time | `int` | `0` | -| `machines[i].mac` | MAC addresses | `[]string` | `[]` | -| `machines[i].nameServers` | Name servers | `[]string` | `[]` | -| `machines[i].timeServers` | Time servers | `[]string` | `[]` | -| `machines[i].uefi` | UEFI | `bool` | `false` | +| Name | Description | Type | Value | +| -------------------------------- | ---------------------------------------------------- | ---------- | ------- | +| `whitelistHTTP` | Secure HTTP by enabling client networks whitelisting | `bool` | `true` | +| `whitelist` | List of client networks | `[]string` | `[]` | +| `machines` | Configuration of physical machine instances | `[]object` | `[]` | +| `machines[i].hostname` | Hostname | `string` | `""` | +| `machines[i].arch` | Architecture | `string` | `""` | +| `machines[i].ip.address` | IP address | `object` | `{}` | +| `machines[i].ip.address.address` | IP address | `string` | `""` | +| `machines[i].ip.address.gateway` | IP gateway | `string` | `""` | +| `machines[i].ip.address.netmask` | Netmask | `string` | `""` | +| `machines[i].leaseTime` | Lease time | `int` | `0` | +| `machines[i].mac` | MAC addresses | `[]string` | `[]` | +| `machines[i].nameServers` | Name servers | `[]string` | `[]` | +| `machines[i].timeServers` | Time servers | `[]string` | `[]` | +| `machines[i].uefi` | UEFI | `bool` | `false` | diff --git a/packages/extra/bootbox/values.schema.json b/packages/extra/bootbox/values.schema.json index 0afa8d36..ae8dca07 100644 --- a/packages/extra/bootbox/values.schema.json +++ b/packages/extra/bootbox/values.schema.json @@ -27,22 +27,31 @@ "ip": { "type": "object", "required": [ - "address", - "gateway", - "netmask" + "address" ], "properties": { "address": { "description": "IP address", - "type": "string" - }, - "gateway": { - "description": "IP gateway", - "type": "string" - }, - "netmask": { - "description": "Netmask", - "type": "string" + "type": "object", + "required": [ + "address", + "gateway", + "netmask" + ], + "properties": { + "address": { + "description": "IP address", + "type": "string" + }, + "gateway": { + "description": "IP gateway", + "type": "string" + }, + "netmask": { + "description": "Netmask", + "type": "string" + } + } } } }, diff --git a/packages/extra/bootbox/values.yaml b/packages/extra/bootbox/values.yaml index 88fa30ed..c334f4db 100644 --- a/packages/extra/bootbox/values.yaml +++ b/packages/extra/bootbox/values.yaml @@ -1,7 +1,7 @@ ## @section Common parameters ## @param whitelistHTTP {bool} Secure HTTP by enabling client networks whitelisting -## @param whitelist {[]*string} List of client networks +## @param whitelist {[]string} List of client networks ## Example: ## whitelistHTTP: true ## whitelist: @@ -15,9 +15,10 @@ whitelist: [] ## @field machine {machine} Machine configuration ## @field machine.hostname {string} Hostname ## @field machine.arch {string} Architecture -## @field machine.ip.address {string} IP address -## @field machine.ip.gateway {string} IP gateway -## @field machine.ip.netmask {string} Netmask +## @field machine.ip.address {machineConfig} IP address +## @field machineConfig.address {string} IP address +## @field machineConfig.gateway {string} IP gateway +## @field machineConfig.netmask {string} Netmask ## @field machine.leaseTime {int} Lease time ## @field machine.mac {[]string} MAC addresses ## @field machine.nameServers {[]string} Name servers diff --git a/packages/extra/etcd/README.md b/packages/extra/etcd/README.md index f87cd8ae..2ed8c5e8 100644 --- a/packages/extra/etcd/README.md +++ b/packages/extra/etcd/README.md @@ -4,10 +4,10 @@ ### Common parameters -| Name | Description | Type | Value | -| -------------- | ----------------------------------- | --------- | -------------------------- | -| `size` | Persistent Volume size | `*string` | `4Gi` | -| `storageClass` | StorageClass used to store the data | `*string` | `""` | -| `replicas` | Number of etcd replicas | `*int` | `3` | -| `resources` | Resource configuration for etcd | `*object` | `{"cpu":4,"memory":"1Gi"}` | +| Name | Description | Type | Value | +| -------------- | ----------------------------------- | ----------- | ----- | +| `size` | Persistent Volume size | `*quantity` | `4Gi` | +| `storageClass` | StorageClass used to store the data | `*string` | `""` | +| `replicas` | Number of etcd replicas | `*int` | `3` | +| `resources` | Resource configuration for etcd | `*object` | `{}` | diff --git a/packages/extra/etcd/values.schema.json b/packages/extra/etcd/values.schema.json index c5581556..4538cf75 100644 --- a/packages/extra/etcd/values.schema.json +++ b/packages/extra/etcd/values.schema.json @@ -17,25 +17,46 @@ "properties": { "cpu": { "description": "The number of CPU cores allocated", - "type": "string", - "default": "4", + "default": 4, "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true }, "memory": { "description": "The amount of memory allocated", - "type": "string", "default": "1Gi", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true } } }, "size": { "description": "Persistent Volume size", - "type": "string", "default": "4Gi", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true }, "storageClass": { diff --git a/packages/extra/monitoring/README.md b/packages/extra/monitoring/README.md index 40933c7d..83602b03 100644 --- a/packages/extra/monitoring/README.md +++ b/packages/extra/monitoring/README.md @@ -11,35 +11,35 @@ ### Metrics storage configuration -| Name | Description | Type | Value | -| ------------------------------------------------ | -------------------------------------------------------------- | ---------- | ------- | -| `metricsStorages` | Configuration of metrics storage instances | `[]object` | `[...]` | -| `metricsStorages[i].name` | Name of the storage instance | `string` | `""` | -| `metricsStorages[i].retentionPeriod` | Retention period for the metrics in the storage instance | `string` | `""` | -| `metricsStorages[i].deduplicationInterval` | Deduplication interval for the metrics in the storage instance | `string` | `""` | -| `metricsStorages[i].storage` | Persistent Volume size for the storage instance | `string` | `""` | -| `metricsStorages[i].storageClassName` | StorageClass used to store the data | `*string` | `null` | -| `metricsStorages[i].vminsert` | Configuration for vminsert component of the storage instance | `*object` | `null` | -| `metricsStorages[i].vminsert.minAllowed` | Requests (minimum allowed/available resources) | `*object` | `null` | -| `metricsStorages[i].vminsert.minAllowed.cpu` | CPU request (minimum available CPU) | `*string` | `null` | -| `metricsStorages[i].vminsert.minAllowed.memory` | Memory request (minimum available memory) | `*string` | `null` | -| `metricsStorages[i].vminsert.maxAllowed` | Limits (maximum allowed/available resources ) | `*object` | `null` | -| `metricsStorages[i].vminsert.maxAllowed.cpu` | CPU limit (maximum available CPU) | `*string` | `null` | -| `metricsStorages[i].vminsert.maxAllowed.memory` | Memory limit (maximum available memory) | `*string` | `null` | -| `metricsStorages[i].vmselect` | Configuration for vmselect component of the storage instance | `*object` | `null` | -| `metricsStorages[i].vmselect.minAllowed` | Requests (minimum allowed/available resources) | `*object` | `null` | -| `metricsStorages[i].vmselect.minAllowed.cpu` | CPU request (minimum available CPU) | `*string` | `null` | -| `metricsStorages[i].vmselect.minAllowed.memory` | Memory request (minimum available memory) | `*string` | `null` | -| `metricsStorages[i].vmselect.maxAllowed` | Limits (maximum allowed/available resources ) | `*object` | `null` | -| `metricsStorages[i].vmselect.maxAllowed.cpu` | CPU limit (maximum available CPU) | `*string` | `null` | -| `metricsStorages[i].vmselect.maxAllowed.memory` | Memory limit (maximum available memory) | `*string` | `null` | -| `metricsStorages[i].vmstorage` | Configuration for vmstorage component of the storage instance | `*object` | `null` | -| `metricsStorages[i].vmstorage.minAllowed` | Requests (minimum allowed/available resources) | `*object` | `null` | -| `metricsStorages[i].vmstorage.minAllowed.cpu` | CPU request (minimum available CPU) | `*string` | `null` | -| `metricsStorages[i].vmstorage.minAllowed.memory` | Memory request (minimum available memory) | `*string` | `null` | -| `metricsStorages[i].vmstorage.maxAllowed` | Limits (maximum allowed/available resources ) | `*object` | `null` | -| `metricsStorages[i].vmstorage.maxAllowed.cpu` | CPU limit (maximum available CPU) | `*string` | `null` | -| `metricsStorages[i].vmstorage.maxAllowed.memory` | Memory limit (maximum available memory) | `*string` | `null` | +| Name | Description | Type | Value | +| ------------------------------------------------ | -------------------------------------------------------------- | ----------- | ------- | +| `metricsStorages` | Configuration of metrics storage instances | `[]object` | `[...]` | +| `metricsStorages[i].name` | Name of the storage instance | `string` | `""` | +| `metricsStorages[i].retentionPeriod` | Retention period for the metrics in the storage instance | `string` | `""` | +| `metricsStorages[i].deduplicationInterval` | Deduplication interval for the metrics in the storage instance | `string` | `""` | +| `metricsStorages[i].storage` | Persistent Volume size for the storage instance | `string` | `""` | +| `metricsStorages[i].storageClassName` | StorageClass used to store the data | `*string` | `null` | +| `metricsStorages[i].vminsert` | Configuration for vminsert component of the storage instance | `*object` | `null` | +| `metricsStorages[i].vminsert.minAllowed` | Requests (minimum allowed/available resources) | `*object` | `null` | +| `metricsStorages[i].vminsert.minAllowed.cpu` | CPU request (minimum available CPU) | `*quantity` | `null` | +| `metricsStorages[i].vminsert.minAllowed.memory` | Memory request (minimum available memory) | `*quantity` | `null` | +| `metricsStorages[i].vminsert.maxAllowed` | Limits (maximum allowed/available resources ) | `*object` | `null` | +| `metricsStorages[i].vminsert.maxAllowed.cpu` | CPU limit (maximum available CPU) | `*quantity` | `null` | +| `metricsStorages[i].vminsert.maxAllowed.memory` | Memory limit (maximum available memory) | `*quantity` | `null` | +| `metricsStorages[i].vmselect` | Configuration for vmselect component of the storage instance | `*object` | `null` | +| `metricsStorages[i].vmselect.minAllowed` | Requests (minimum allowed/available resources) | `*object` | `null` | +| `metricsStorages[i].vmselect.minAllowed.cpu` | CPU request (minimum available CPU) | `*quantity` | `null` | +| `metricsStorages[i].vmselect.minAllowed.memory` | Memory request (minimum available memory) | `*quantity` | `null` | +| `metricsStorages[i].vmselect.maxAllowed` | Limits (maximum allowed/available resources ) | `*object` | `null` | +| `metricsStorages[i].vmselect.maxAllowed.cpu` | CPU limit (maximum available CPU) | `*quantity` | `null` | +| `metricsStorages[i].vmselect.maxAllowed.memory` | Memory limit (maximum available memory) | `*quantity` | `null` | +| `metricsStorages[i].vmstorage` | Configuration for vmstorage component of the storage instance | `*object` | `null` | +| `metricsStorages[i].vmstorage.minAllowed` | Requests (minimum allowed/available resources) | `*object` | `null` | +| `metricsStorages[i].vmstorage.minAllowed.cpu` | CPU request (minimum available CPU) | `*quantity` | `null` | +| `metricsStorages[i].vmstorage.minAllowed.memory` | Memory request (minimum available memory) | `*quantity` | `null` | +| `metricsStorages[i].vmstorage.maxAllowed` | Limits (maximum allowed/available resources ) | `*object` | `null` | +| `metricsStorages[i].vmstorage.maxAllowed.cpu` | CPU limit (maximum available CPU) | `*quantity` | `null` | +| `metricsStorages[i].vmstorage.maxAllowed.memory` | Memory limit (maximum available memory) | `*quantity` | `null` | ### Logs storage configuration @@ -55,37 +55,37 @@ ### Alerta configuration -| Name | Description | Type | Value | -| ----------------------------------------- | ----------------------------------------------------------------------------------- | --------- | ------- | -| `alerta` | Configuration for Alerta service | `object` | `{}` | -| `alerta.storage` | Persistent Volume size for the database | `*string` | `10Gi` | -| `alerta.storageClassName` | StorageClass used to store the data | `*string` | `""` | -| `alerta.resources` | Resources configuration | `*object` | `null` | -| `alerta.resources.requests` | | `*object` | `null` | -| `alerta.resources.requests.cpu` | CPU request (minimum available CPU) | `*string` | `100m` | -| `alerta.resources.requests.memory` | Memory request (minimum available memory) | `*string` | `256Mi` | -| `alerta.resources.limits` | | `*object` | `null` | -| `alerta.resources.limits.cpu` | CPU limit (maximum available CPU) | `*string` | `1` | -| `alerta.resources.limits.memory` | Memory limit (maximum available memory) | `*string` | `1Gi` | -| `alerta.alerts` | Configuration for alerts | `*object` | `null` | -| `alerta.alerts.telegram` | Configuration for Telegram alerts | `*object` | `null` | -| `alerta.alerts.telegram.token` | Telegram token for your bot | `string` | `""` | -| `alerta.alerts.telegram.chatID` | Specify multiple ID's separated by comma. Get yours in https://t.me/chatid_echo_bot | `string` | `""` | -| `alerta.alerts.telegram.disabledSeverity` | List of severity without alerts, separated by comma like: "informational,warning" | `string` | `""` | +| Name | Description | Type | Value | +| ----------------------------------------- | ----------------------------------------------------------------------------------- | ----------- | ------- | +| `alerta` | Configuration for Alerta service | `object` | `{}` | +| `alerta.storage` | Persistent Volume size for the database | `*string` | `10Gi` | +| `alerta.storageClassName` | StorageClass used to store the data | `*string` | `""` | +| `alerta.resources` | Resources configuration | `*object` | `null` | +| `alerta.resources.requests` | | `*object` | `null` | +| `alerta.resources.requests.cpu` | CPU request (minimum available CPU) | `*quantity` | `100m` | +| `alerta.resources.requests.memory` | Memory request (minimum available memory) | `*quantity` | `256Mi` | +| `alerta.resources.limits` | | `*object` | `null` | +| `alerta.resources.limits.cpu` | CPU limit (maximum available CPU) | `*quantity` | `1` | +| `alerta.resources.limits.memory` | Memory limit (maximum available memory) | `*quantity` | `1Gi` | +| `alerta.alerts` | Configuration for alerts | `*object` | `null` | +| `alerta.alerts.telegram` | Configuration for Telegram alerts | `*object` | `null` | +| `alerta.alerts.telegram.token` | Telegram token for your bot | `string` | `""` | +| `alerta.alerts.telegram.chatID` | Specify multiple ID's separated by comma. Get yours in https://t.me/chatid_echo_bot | `string` | `""` | +| `alerta.alerts.telegram.disabledSeverity` | List of severity without alerts, separated by comma like: "informational,warning" | `string` | `""` | ### Grafana configuration -| Name | Description | Type | Value | -| ----------------------------------- | ----------------------------------------- | --------- | ------- | -| `grafana` | Configuration for Grafana | `object` | `{}` | -| `grafana.db` | Database configuration | `*object` | `null` | -| `grafana.db.size` | Persistent Volume size for the database | `*string` | `10Gi` | -| `grafana.resources` | Resources configuration | `*object` | `null` | -| `grafana.resources.requests` | | `*object` | `null` | -| `grafana.resources.requests.cpu` | CPU request (minimum available CPU) | `*string` | `100m` | -| `grafana.resources.requests.memory` | Memory request (minimum available memory) | `*string` | `256Mi` | -| `grafana.resources.limits` | | `*object` | `null` | -| `grafana.resources.limits.cpu` | CPU limit (maximum available CPU) | `*string` | `1` | -| `grafana.resources.limits.memory` | Memory limit (maximum available memory) | `*string` | `1Gi` | +| Name | Description | Type | Value | +| ----------------------------------- | ----------------------------------------- | ----------- | ------- | +| `grafana` | Configuration for Grafana | `object` | `{}` | +| `grafana.db` | Database configuration | `*object` | `null` | +| `grafana.db.size` | Persistent Volume size for the database | `*string` | `10Gi` | +| `grafana.resources` | Resources configuration | `*object` | `null` | +| `grafana.resources.requests` | | `*object` | `null` | +| `grafana.resources.requests.cpu` | CPU request (minimum available CPU) | `*quantity` | `100m` | +| `grafana.resources.requests.memory` | Memory request (minimum available memory) | `*quantity` | `256Mi` | +| `grafana.resources.limits` | | `*object` | `null` | +| `grafana.resources.limits.cpu` | CPU limit (maximum available CPU) | `*quantity` | `1` | +| `grafana.resources.limits.memory` | Memory limit (maximum available memory) | `*quantity` | `1Gi` | diff --git a/packages/extra/monitoring/values.schema.json b/packages/extra/monitoring/values.schema.json index 2762324e..0014f55c 100644 --- a/packages/extra/monitoring/values.schema.json +++ b/packages/extra/monitoring/values.schema.json @@ -91,16 +91,30 @@ "properties": { "cpu": { "description": "CPU limit (maximum available CPU)", - "type": "string", - "default": "1", + "default": 1, "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true }, "memory": { "description": "Memory limit (maximum available memory)", - "type": "string", "default": "1Gi", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true } } @@ -114,16 +128,30 @@ "properties": { "cpu": { "description": "CPU request (minimum available CPU)", - "type": "string", "default": "100m", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true }, "memory": { "description": "Memory request (minimum available memory)", - "type": "string", "default": "256Mi", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true } } @@ -197,16 +225,30 @@ "properties": { "cpu": { "description": "CPU limit (maximum available CPU)", - "type": "string", - "default": "1", + "default": 1, "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true }, "memory": { "description": "Memory limit (maximum available memory)", - "type": "string", "default": "1Gi", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true } } @@ -220,16 +262,30 @@ "properties": { "cpu": { "description": "CPU request (minimum available CPU)", - "type": "string", "default": "100m", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true }, "memory": { "description": "Memory request (minimum available memory)", - "type": "string", "default": "256Mi", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true } } @@ -338,16 +394,30 @@ "properties": { "cpu": { "description": "CPU limit (maximum available CPU)", - "type": "string", - "default": "1", + "default": 1, "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true }, "memory": { "description": "Memory limit (maximum available memory)", - "type": "string", "default": "1Gi", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true } } @@ -358,16 +428,30 @@ "properties": { "cpu": { "description": "CPU request (minimum available CPU)", - "type": "string", "default": "100m", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true }, "memory": { "description": "Memory request (minimum available memory)", - "type": "string", "default": "256Mi", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true } } @@ -384,16 +468,30 @@ "properties": { "cpu": { "description": "CPU limit (maximum available CPU)", - "type": "string", - "default": "1", + "default": 1, "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true }, "memory": { "description": "Memory limit (maximum available memory)", - "type": "string", "default": "1Gi", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true } } @@ -404,16 +502,30 @@ "properties": { "cpu": { "description": "CPU request (minimum available CPU)", - "type": "string", "default": "100m", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true }, "memory": { "description": "Memory request (minimum available memory)", - "type": "string", "default": "256Mi", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true } } @@ -430,16 +542,30 @@ "properties": { "cpu": { "description": "CPU limit (maximum available CPU)", - "type": "string", - "default": "1", + "default": 1, "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true }, "memory": { "description": "Memory limit (maximum available memory)", - "type": "string", "default": "1Gi", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true } } @@ -450,16 +576,30 @@ "properties": { "cpu": { "description": "CPU request (minimum available CPU)", - "type": "string", "default": "100m", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true }, "memory": { "description": "Memory request (minimum available memory)", - "type": "string", "default": "256Mi", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true } } diff --git a/packages/extra/seaweedfs/README.md b/packages/extra/seaweedfs/README.md index 96a2ed17..a2cb311e 100644 --- a/packages/extra/seaweedfs/README.md +++ b/packages/extra/seaweedfs/README.md @@ -4,19 +4,19 @@ ### Common parameters -| Name | Description | Type | Value | -| ---------------------- | ------------------------------------------------------------------------------------------------------ | ------------------- | ----------------------------------------------- | -| `host` | The hostname used to access the SeaweedFS externally (defaults to 's3' subdomain for the tenant host). | `*string` | `""` | -| `topology` | The topology of the SeaweedFS cluster. (allowed values: Simple, MultiZone, Client) | `string` | `{}` | -| `replicationFactor` | Replication factor: number of replicas for each volume in the SeaweedFS cluster. | `int` | `2` | -| `replicas` | Number of replicas | `int` | `2` | -| `size` | Persistent Volume size | `string` | `10Gi` | -| `storageClass` | StorageClass used to store the data | `*string` | `""` | -| `zones` | A map of zones for MultiZone topology. Each zone can have its own number of replicas and size. | `map[string]object` | `{...}` | -| `zones[name].replicas` | Number of replicas in the zone | `int` | `0` | -| `zones[name].size` | Zone storage size | `string` | `""` | -| `filer` | Filer service configuration | `*object` | `{"grpcHost":"","grpcPort":443,"whitelist":[]}` | -| `filer.grpcHost` | The hostname used to expose or access the filer service externally. | `*string` | `""` | -| `filer.grpcPort` | The port used to access the filer service externally. | `*int` | `443` | -| `filer.whitelist` | A list of IP addresses or CIDR ranges that are allowed to access the filer service. | `[]*string` | `[]` | +| Name | Description | Type | Value | +| ---------------------- | ------------------------------------------------------------------------------------------------------ | ------------------- | -------- | +| `host` | The hostname used to access the SeaweedFS externally (defaults to 's3' subdomain for the tenant host). | `*string` | `""` | +| `topology` | The topology of the SeaweedFS cluster. (allowed values: Simple, MultiZone, Client) | `string` | `Simple` | +| `replicationFactor` | Replication factor: number of replicas for each volume in the SeaweedFS cluster. | `int` | `2` | +| `replicas` | Number of replicas | `int` | `2` | +| `size` | Persistent Volume size | `quantity` | `10Gi` | +| `storageClass` | StorageClass used to store the data | `*string` | `""` | +| `zones` | A map of zones for MultiZone topology. Each zone can have its own number of replicas and size. | `map[string]object` | `{...}` | +| `zones[name].replicas` | Number of replicas in the zone | `int` | `0` | +| `zones[name].size` | Zone storage size | `quantity` | `""` | +| `filer` | Filer service configuration | `*object` | `{}` | +| `filer.grpcHost` | The hostname used to expose or access the filer service externally. | `*string` | `""` | +| `filer.grpcPort` | The port used to access the filer service externally. | `*int` | `443` | +| `filer.whitelist` | A list of IP addresses or CIDR ranges that are allowed to access the filer service. | `[]*string` | `[]` | diff --git a/packages/extra/seaweedfs/values.schema.json b/packages/extra/seaweedfs/values.schema.json index 24cce446..2d890f27 100644 --- a/packages/extra/seaweedfs/values.schema.json +++ b/packages/extra/seaweedfs/values.schema.json @@ -46,9 +46,16 @@ }, "size": { "description": "Persistent Volume size", - "type": "string", "default": "10Gi", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true }, "storageClass": { @@ -82,8 +89,15 @@ }, "size": { "description": "Zone storage size", - "type": "string", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ], "x-kubernetes-int-or-string": true } }