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