From 4da8ac3b7793a0d73213d2268a1cb31976d46de0 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Thu, 9 May 2024 10:45:57 +0200 Subject: [PATCH] Add schema generation and remove default values (#110) * Add schema generation and remove default values * fix monitoring schema generation * fix default values Signed-off-by: Andrei Kvapil --- packages/apps/clickhouse/Makefile | 2 + packages/apps/clickhouse/README.md | 17 +++++ packages/apps/clickhouse/values.schema.json | 21 ++++++ packages/apps/clickhouse/values.yaml | 24 +++++-- packages/apps/http-cache/Makefile | 3 + packages/apps/http-cache/README.md | 17 +++++ .../apps/http-cache/images/nginx-cache.json | 4 +- packages/apps/http-cache/values.schema.json | 42 +++++++++++ packages/apps/http-cache/values.yaml | 31 +++++--- packages/apps/kafka/Chart.yaml | 2 +- packages/apps/kafka/Makefile | 2 + packages/apps/kafka/README.md | 19 +++++ packages/apps/kafka/templates/kafka.yaml | 4 +- packages/apps/kafka/values.schema.json | 47 ++++++++++++ packages/apps/kafka/values.yaml | 43 +++++++---- packages/apps/kubernetes/Makefile | 3 + packages/apps/kubernetes/README.md | 10 +++ packages/apps/kubernetes/values.schema.json | 21 ++++++ packages/apps/kubernetes/values.yaml | 8 +++ packages/apps/mysql/Makefile | 2 + packages/apps/mysql/README.md | 31 ++++++++ packages/apps/mysql/templates/secret.yaml | 8 +++ packages/apps/mysql/values.schema.json | 72 +++++++++++++++++++ packages/apps/mysql/values.yaml | 58 ++++++++++----- packages/apps/postgres/Makefile | 2 + packages/apps/postgres/README.md | 32 +++++++++ packages/apps/postgres/values.schema.json | 71 ++++++++++++++++++ packages/apps/postgres/values.yaml | 69 ++++++++++++------ packages/apps/rabbitmq/Makefile | 2 + packages/apps/rabbitmq/README.md | 9 +++ packages/apps/rabbitmq/values.schema.json | 26 +++---- packages/apps/rabbitmq/values.yaml | 7 +- packages/apps/redis/Makefile | 2 + packages/apps/redis/README.md | 12 ++++ packages/apps/redis/values.schema.json | 35 ++++----- packages/apps/redis/values.yaml | 10 ++- packages/apps/tcp-balancer/Makefile | 4 ++ packages/apps/tcp-balancer/README.md | 20 ++++++ packages/apps/tcp-balancer/values.schema.json | 62 ++++++++++++++++ packages/apps/tcp-balancer/values.yaml | 46 +++++++++--- packages/apps/tenant/Chart.yaml | 4 +- packages/apps/tenant/Makefile | 2 + packages/apps/tenant/README.md | 11 +++ packages/apps/tenant/values.schema.json | 49 +++++++------ packages/apps/tenant/values.yaml | 6 ++ packages/apps/versions_map | 9 ++- packages/apps/virtual-machine/Chart.yaml | 2 +- packages/apps/virtual-machine/Makefile | 7 ++ packages/apps/virtual-machine/README.md | 14 ++++ .../apps/virtual-machine/values.schema.json | 53 ++++++++------ packages/apps/virtual-machine/values.yaml | 10 +++ packages/apps/vpn/Makefile | 2 + packages/apps/vpn/README.md | 15 ++++ packages/apps/vpn/values.schema.json | 16 +++++ packages/apps/vpn/values.yaml | 20 ++++-- packages/core/installer/images/cozystack.json | 4 +- packages/extra/etcd/Makefile | 2 + packages/extra/etcd/README.md | 10 +++ packages/extra/etcd/templates/datastore.yaml | 8 +-- .../extra/etcd/templates/etcd-cluster.yaml | 36 +++++----- packages/extra/etcd/values.schema.json | 16 +++++ packages/extra/etcd/values.yaml | 7 ++ packages/extra/ingress/Makefile | 2 + packages/extra/ingress/README.md | 9 +++ .../ingress/templates/nginx-ingress.yaml | 1 + packages/extra/ingress/values.schema.json | 11 +++ packages/extra/ingress/values.yaml | 5 ++ packages/extra/monitoring/Makefile | 6 ++ packages/extra/monitoring/README.md | 11 +++ packages/extra/monitoring/values.schema.json | 29 ++++++++ packages/extra/monitoring/values.yaml | 7 ++ .../dashboard/images/kubeapps-apis.json | 4 +- 72 files changed, 1087 insertions(+), 201 deletions(-) create mode 100644 packages/apps/clickhouse/Makefile create mode 100644 packages/apps/clickhouse/README.md create mode 100644 packages/apps/clickhouse/values.schema.json create mode 100644 packages/apps/http-cache/values.schema.json create mode 100644 packages/apps/kafka/Makefile create mode 100644 packages/apps/kafka/README.md create mode 100644 packages/apps/kafka/values.schema.json create mode 100644 packages/apps/kubernetes/values.schema.json create mode 100644 packages/apps/mysql/Makefile create mode 100644 packages/apps/mysql/values.schema.json create mode 100644 packages/apps/postgres/Makefile create mode 100644 packages/apps/postgres/values.schema.json create mode 100644 packages/apps/rabbitmq/Makefile create mode 100644 packages/apps/redis/Makefile create mode 100644 packages/apps/tcp-balancer/Makefile create mode 100644 packages/apps/tcp-balancer/values.schema.json create mode 100644 packages/apps/tenant/Makefile create mode 100644 packages/apps/virtual-machine/Makefile create mode 100644 packages/apps/vpn/Makefile create mode 100644 packages/apps/vpn/values.schema.json create mode 100644 packages/extra/etcd/Makefile create mode 100644 packages/extra/etcd/README.md create mode 100644 packages/extra/etcd/values.schema.json create mode 100644 packages/extra/etcd/values.yaml create mode 100644 packages/extra/ingress/Makefile create mode 100644 packages/extra/ingress/README.md create mode 100644 packages/extra/ingress/values.schema.json create mode 100644 packages/extra/ingress/values.yaml create mode 100644 packages/extra/monitoring/Makefile create mode 100644 packages/extra/monitoring/README.md create mode 100644 packages/extra/monitoring/values.schema.json diff --git a/packages/apps/clickhouse/Makefile b/packages/apps/clickhouse/Makefile new file mode 100644 index 00000000..207e2133 --- /dev/null +++ b/packages/apps/clickhouse/Makefile @@ -0,0 +1,2 @@ +generate: + readme-generator -v values.yaml -s values.schema.json -r README.md diff --git a/packages/apps/clickhouse/README.md b/packages/apps/clickhouse/README.md new file mode 100644 index 00000000..4164535a --- /dev/null +++ b/packages/apps/clickhouse/README.md @@ -0,0 +1,17 @@ +# Managed Clickhouse Service + +## Parameters + +### Common parameters + +| Name | Description | Value | +| ---------- | ----------------------------- | ------ | +| `size` | Persistent Volume size | `10Gi` | +| `shards` | Number of Clickhouse replicas | `1` | +| `replicas` | Number of Clickhouse shards | `2` | + +### Configuration parameters + +| Name | Description | Value | +| ------- | ------------------- | ----- | +| `users` | Users configuration | `{}` | diff --git a/packages/apps/clickhouse/values.schema.json b/packages/apps/clickhouse/values.schema.json new file mode 100644 index 00000000..30cfcd08 --- /dev/null +++ b/packages/apps/clickhouse/values.schema.json @@ -0,0 +1,21 @@ +{ + "title": "Chart Values", + "type": "object", + "properties": { + "size": { + "type": "string", + "description": "Persistent Volume size", + "default": "10Gi" + }, + "shards": { + "type": "number", + "description": "Number of Clickhouse replicas", + "default": 1 + }, + "replicas": { + "type": "number", + "description": "Number of Clickhouse shards", + "default": 2 + } + } +} \ No newline at end of file diff --git a/packages/apps/clickhouse/values.yaml b/packages/apps/clickhouse/values.yaml index d6b3ecc9..b4fc8664 100644 --- a/packages/apps/clickhouse/values.yaml +++ b/packages/apps/clickhouse/values.yaml @@ -1,10 +1,22 @@ +## @section Common parameters + +## @param size Persistent Volume size +## @param shards Number of Clickhouse replicas +## @param replicas Number of Clickhouse shards +## size: 10Gi shards: 1 replicas: 2 -users: - user1: - password: strongpassword - user2: - readonly: true - password: hackme +## @section Configuration parameters + +## @param users [object] Users configuration +## Example: +## users: +## user1: +## password: strongpassword +## user2: +## readonly: true +## password: hackme +## +users: {} diff --git a/packages/apps/http-cache/Makefile b/packages/apps/http-cache/Makefile index 4a6c8ee7..2738f769 100644 --- a/packages/apps/http-cache/Makefile +++ b/packages/apps/http-cache/Makefile @@ -16,6 +16,9 @@ image-nginx: --load=$(LOAD) echo "$(REGISTRY)/nginx-cache:$(call settag,$(NGINX_CACHE_TAG))" > images/nginx-cache.tag +generate: + readme-generator -v values.yaml -s values.schema.json -r README.md + update: tag=$$(git ls-remote --tags --sort="v:refname" https://github.com/chrislim2888/IP2Location-C-Library | awk -F'[/^]' 'END{print $$3}') && \ sed -i "/^ARG IP2LOCATION_C_VERSION=/ s/=.*/=$$tag/" images/nginx/Dockerfile diff --git a/packages/apps/http-cache/README.md b/packages/apps/http-cache/README.md index 90b8e7e8..c02704bf 100644 --- a/packages/apps/http-cache/README.md +++ b/packages/apps/http-cache/README.md @@ -55,3 +55,20 @@ The deployment architecture is illustrated in the diagram below: VTS module shows wrong upstream resonse time - https://github.com/vozlt/nginx-module-vts/issues/198 + +## Parameters + +### Common parameters + +| Name | Description | Value | +| ------------------ | ----------------------------------------------- | ------- | +| `external` | Enable external access from outside the cluster | `false` | +| `size` | Persistent Volume size | `10Gi` | +| `haproxy.replicas` | Number of HAProxy replicas | `2` | +| `nginx.replicas` | Number of Nginx replicas | `2` | + +### Configuration parameters + +| Name | Description | Value | +| ----------- | ----------------------- | ----- | +| `endpoints` | Endpoints configuration | `[]` | diff --git a/packages/apps/http-cache/images/nginx-cache.json b/packages/apps/http-cache/images/nginx-cache.json index 0243ecdc..fb130a5e 100644 --- a/packages/apps/http-cache/images/nginx-cache.json +++ b/packages/apps/http-cache/images/nginx-cache.json @@ -1,4 +1,4 @@ { - "containerimage.config.digest": "sha256:9eb68d2d503d7e22afc6fde2635f566fd3456bbdb3caad5dc9f887be1dc2b8ab", - "containerimage.digest": "sha256:1f44274dbc2c3be2a98e6cef83d68a041ae9ef31abb8ab069a525a2a92702bdd" + "containerimage.config.digest": "sha256:2be806d1d79cbb979b71774d75e610ebbaf1c22608402249a83e043860d754c7", + "containerimage.digest": "sha256:49e22533ee97b90a716923aebf5f2654c4a8b47db0b2fab9daf8ecc34c40e7d0" } \ No newline at end of file diff --git a/packages/apps/http-cache/values.schema.json b/packages/apps/http-cache/values.schema.json new file mode 100644 index 00000000..8fc55522 --- /dev/null +++ b/packages/apps/http-cache/values.schema.json @@ -0,0 +1,42 @@ +{ + "title": "Chart Values", + "type": "object", + "properties": { + "external": { + "type": "boolean", + "description": "Enable external access from outside the cluster", + "default": false + }, + "size": { + "type": "string", + "description": "Persistent Volume size", + "default": "10Gi" + }, + "haproxy": { + "type": "object", + "properties": { + "replicas": { + "type": "number", + "description": "Number of HAProxy replicas", + "default": 2 + } + } + }, + "nginx": { + "type": "object", + "properties": { + "replicas": { + "type": "number", + "description": "Number of Nginx replicas", + "default": 2 + } + } + }, + "endpoints": { + "type": "array", + "description": "Endpoints configuration", + "default": [], + "items": {} + } + } +} \ No newline at end of file diff --git a/packages/apps/http-cache/values.yaml b/packages/apps/http-cache/values.yaml index 5f326ece..65585cc8 100644 --- a/packages/apps/http-cache/values.yaml +++ b/packages/apps/http-cache/values.yaml @@ -1,15 +1,28 @@ -external: false +## @section Common parameters + +## @param external Enable external access from outside the cluster +## @param size Persistent Volume size +## @param haproxy.replicas Number of HAProxy replicas +## @param nginx.replicas Number of Nginx replicas +## +external: false +size: 10Gi haproxy: replicas: 2 nginx: replicas: 2 -size: 10Gi -endpoints: - - 10.100.3.1:80 - - 10.100.3.11:80 - - 10.100.3.2:80 - - 10.100.3.12:80 - - 10.100.3.3:80 - - 10.100.3.13:80 +## @section Configuration parameters + +## @param endpoints Endpoints configuration +## Example: +## endpoints: +## - 10.100.3.1:80 +## - 10.100.3.11:80 +## - 10.100.3.2:80 +## - 10.100.3.12:80 +## - 10.100.3.3:80 +## - 10.100.3.13:80 +## +endpoints: [] diff --git a/packages/apps/kafka/Chart.yaml b/packages/apps/kafka/Chart.yaml index 5bb5a25c..289ba581 100644 --- a/packages/apps/kafka/Chart.yaml +++ b/packages/apps/kafka/Chart.yaml @@ -16,7 +16,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 +version: 0.2.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/packages/apps/kafka/Makefile b/packages/apps/kafka/Makefile new file mode 100644 index 00000000..207e2133 --- /dev/null +++ b/packages/apps/kafka/Makefile @@ -0,0 +1,2 @@ +generate: + readme-generator -v values.yaml -s values.schema.json -r README.md diff --git a/packages/apps/kafka/README.md b/packages/apps/kafka/README.md new file mode 100644 index 00000000..f01453c6 --- /dev/null +++ b/packages/apps/kafka/README.md @@ -0,0 +1,19 @@ +# Managed Kafka Service + +## Parameters + +### Common parameters + +| Name | Description | Value | +| -------------------- | ----------------------------------------------- | ------- | +| `external` | Enable external access from outside the cluster | `false` | +| `kafka.size` | Persistent Volume size for Kafka | `10Gi` | +| `kafka.replicas` | Number of Kafka replicas | `3` | +| `zookeeper.size` | Persistent Volume size for ZooKeeper | `5Gi` | +| `zookeeper.replicas` | Number of ZooKeeper replicas | `3` | + +### Configuration parameters + +| Name | Description | Value | +| -------- | -------------------- | ----- | +| `topics` | Topics configuration | `[]` | diff --git a/packages/apps/kafka/templates/kafka.yaml b/packages/apps/kafka/templates/kafka.yaml index 9a8ebeb7..bb53c1b5 100644 --- a/packages/apps/kafka/templates/kafka.yaml +++ b/packages/apps/kafka/templates/kafka.yaml @@ -7,7 +7,7 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} spec: kafka: - replicas: {{ .Values.replicas }} + replicas: {{ .Values.kafka.replicas }} listeners: - name: plain port: 9092 @@ -41,7 +41,7 @@ spec: {{- end }} deleteClaim: true zookeeper: - replicas: {{ .Values.replicas }} + replicas: {{ .Values.zookeeper.replicas }} storage: type: persistent-claim {{- with .Values.zookeeper.size }} diff --git a/packages/apps/kafka/values.schema.json b/packages/apps/kafka/values.schema.json new file mode 100644 index 00000000..277ad48c --- /dev/null +++ b/packages/apps/kafka/values.schema.json @@ -0,0 +1,47 @@ +{ + "title": "Chart Values", + "type": "object", + "properties": { + "external": { + "type": "boolean", + "description": "Enable external access from outside the cluster", + "default": false + }, + "kafka": { + "type": "object", + "properties": { + "size": { + "type": "string", + "description": "Persistent Volume size for Kafka", + "default": "10Gi" + }, + "replicas": { + "type": "number", + "description": "Number of Kafka replicas", + "default": 3 + } + } + }, + "zookeeper": { + "type": "object", + "properties": { + "size": { + "type": "string", + "description": "Persistent Volume size for ZooKeeper", + "default": "5Gi" + }, + "replicas": { + "type": "number", + "description": "Number of ZooKeeper replicas", + "default": 3 + } + } + }, + "topics": { + "type": "array", + "description": "Topics configuration", + "default": [], + "items": {} + } + } +} \ No newline at end of file diff --git a/packages/apps/kafka/values.yaml b/packages/apps/kafka/values.yaml index e99bfa89..b8da34d8 100644 --- a/packages/apps/kafka/values.yaml +++ b/packages/apps/kafka/values.yaml @@ -1,3 +1,12 @@ + +## @section Common parameters + +## @param external Enable external access from outside the cluster +## @param kafka.size Persistent Volume size for Kafka +## @param kafka.replicas Number of Kafka replicas +## @param zookeeper.size Persistent Volume size for ZooKeeper +## @param zookeeper.replicas Number of ZooKeeper replicas +## external: false kafka: size: 10Gi @@ -6,17 +15,23 @@ zookeeper: size: 5Gi replicas: 3 -topics: - - name: Results - partitions: 1 - replicas: 3 - config: - min.insync.replicas: 2 - - name: Orders - config: - cleanup.policy: compact - segment.ms: 3600000 - max.compaction.lag.ms: 5400000 - min.insync.replicas: 2 - partitions: 1 - replicationFactor: 3 +## @section Configuration parameters + +## @param topics Topics configuration +## Example: +## topics: +## - name: Results +## partitions: 1 +## replicas: 3 +## config: +## min.insync.replicas: 2 +## - name: Orders +## config: +## cleanup.policy: compact +## segment.ms: 3600000 +## max.compaction.lag.ms: 5400000 +## min.insync.replicas: 2 +## partitions: 1 +## replicationFactor: 3 +## +topics: [] diff --git a/packages/apps/kubernetes/Makefile b/packages/apps/kubernetes/Makefile index ecefd153..e8781a00 100644 --- a/packages/apps/kubernetes/Makefile +++ b/packages/apps/kubernetes/Makefile @@ -2,6 +2,9 @@ UBUNTU_CONTAINER_DISK_TAG = v1.29.1 include ../../../scripts/common-envs.mk +generate: + readme-generator -v values.yaml -s values.schema.json -r README.md + image: image-ubuntu-container-disk image-ubuntu-container-disk: diff --git a/packages/apps/kubernetes/README.md b/packages/apps/kubernetes/README.md index aaa8d398..2d5b43a5 100644 --- a/packages/apps/kubernetes/README.md +++ b/packages/apps/kubernetes/README.md @@ -26,3 +26,13 @@ How to access to deployed cluster: ``` kubectl get secret -n kubernetes--admin-kubeconfig -o go-template='{{ printf "%s\n" (index .data "super-admin.conf" | base64decode) }}' > test ``` + +## Parameters + +### Common parameters + +| Name | Description | Value | +| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ----- | +| `host` | The hostname used to access the Kubernetes cluster externally (defaults to using the cluster name as a subdomain for the tenant host). | `""` | +| `controlPlane.replicas` | Number of replicas for Kubernetes contorl-plane components | `2` | +| `nodeGroups` | nodeGroups configuration | `{}` | diff --git a/packages/apps/kubernetes/values.schema.json b/packages/apps/kubernetes/values.schema.json new file mode 100644 index 00000000..d467b3fe --- /dev/null +++ b/packages/apps/kubernetes/values.schema.json @@ -0,0 +1,21 @@ +{ + "title": "Chart Values", + "type": "object", + "properties": { + "host": { + "type": "string", + "description": "The hostname used to access the Kubernetes cluster externally (defaults to using the cluster name as a subdomain for the tenant host).", + "default": "" + }, + "controlPlane": { + "type": "object", + "properties": { + "replicas": { + "type": "number", + "description": "Number of replicas for Kubernetes contorl-plane components", + "default": 2 + } + } + } + } +} \ No newline at end of file diff --git a/packages/apps/kubernetes/values.yaml b/packages/apps/kubernetes/values.yaml index 2a8fd46b..15b5cc2b 100644 --- a/packages/apps/kubernetes/values.yaml +++ b/packages/apps/kubernetes/values.yaml @@ -1,6 +1,14 @@ +## @section Common parameters + +## @param host The hostname used to access the Kubernetes cluster externally (defaults to using the cluster name as a subdomain for the tenant host). +## @param controlPlane.replicas Number of replicas for Kubernetes contorl-plane components +## host: "" controlPlane: replicas: 2 + +## @param nodeGroups [object] nodeGroups configuration +## nodeGroups: md0: minReplicas: 0 diff --git a/packages/apps/mysql/Makefile b/packages/apps/mysql/Makefile new file mode 100644 index 00000000..207e2133 --- /dev/null +++ b/packages/apps/mysql/Makefile @@ -0,0 +1,2 @@ +generate: + readme-generator -v values.yaml -s values.schema.json -r README.md diff --git a/packages/apps/mysql/README.md b/packages/apps/mysql/README.md index f8ff37dc..2f0da660 100644 --- a/packages/apps/mysql/README.md +++ b/packages/apps/mysql/README.md @@ -62,3 +62,34 @@ more details: mysqldump -h -P 3306 -u -p --column-statistics=0 ~/tmp/fix-table.sql mysql -h -P 3306 -u -p < ~/tmp/fix-table.sql ``` + +## Parameters + +### Common parameters + +| Name | Description | Value | +| ---------- | ----------------------------------------------- | ------- | +| `external` | Enable external access from outside the cluster | `false` | +| `size` | Persistent Volume size | `10Gi` | +| `replicas` | Number of MariaDB replicas | `2` | + +### Configuration parameters + +| Name | Description | Value | +| ----------- | ----------------------- | ----- | +| `users` | Users configuration | `{}` | +| `databases` | Databases configuration | `[]` | + +### Backup parameters + +| Name | Description | Value | +| ------------------------ | ---------------------------------------------- | ------------------------------------------------------ | +| `backup.enabled` | Enable pereiodic backups | `false` | +| `backup.s3Region` | The AWS S3 region where backups are stored | `us-east-1` | +| `backup.s3Bucket` | The S3 bucket used for storing backups | `s3.example.org/postgres-backups` | +| `backup.schedule` | Cron schedule for automated backups | `0 2 * * *` | +| `backup.cleanupStrategy` | The strategy for cleaning up old backups | `--keep-last=3 --keep-daily=3 --keep-within-weekly=1m` | +| `backup.s3AccessKey` | The access key for S3, used for authentication | `oobaiRus9pah8PhohL1ThaeTa4UVa7gu` | +| `backup.s3SecretKey` | The secret key for S3, used for authentication | `ju3eum4dekeich9ahM1te8waeGai0oog` | +| `backup.resticPassword` | The password for Restic backup encryption | `ChaXoveekoh6eigh4siesheeda2quai0` | + diff --git a/packages/apps/mysql/templates/secret.yaml b/packages/apps/mysql/templates/secret.yaml index 821b3a00..b4d87862 100644 --- a/packages/apps/mysql/templates/secret.yaml +++ b/packages/apps/mysql/templates/secret.yaml @@ -7,3 +7,11 @@ stringData: {{- range $name, $u := .Values.users }} {{ $name }}-password: {{ $u.password }} {{- end }} + {{- if not (and .Values.users.root .Values.users.root.password) }} + {{- $existingSecret := lookup "v1" "Secret" .Release.Namespace .Release.Name }} + {{- if and $existingSecret (index $existingSecret.data "root-password") }} + root-password: {{ index $existingSecret.data "root-password" }} + {{- else }} + root-password: {{ randAlphaNum 10 }} + {{- end }} + {{- end }} diff --git a/packages/apps/mysql/values.schema.json b/packages/apps/mysql/values.schema.json new file mode 100644 index 00000000..98d8c516 --- /dev/null +++ b/packages/apps/mysql/values.schema.json @@ -0,0 +1,72 @@ +{ + "title": "Chart Values", + "type": "object", + "properties": { + "external": { + "type": "boolean", + "description": "Enable external access from outside the cluster", + "default": false + }, + "size": { + "type": "string", + "description": "Persistent Volume size", + "default": "10Gi" + }, + "replicas": { + "type": "number", + "description": "Number of MariaDB replicas", + "default": 2 + }, + "databases": { + "type": "array", + "description": "Databases configuration", + "default": [], + "items": {} + }, + "backup": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable pereiodic backups", + "default": false + }, + "s3Region": { + "type": "string", + "description": "The AWS S3 region where backups are stored", + "default": "us-east-1" + }, + "s3Bucket": { + "type": "string", + "description": "The S3 bucket used for storing backups", + "default": "s3.example.org/postgres-backups" + }, + "schedule": { + "type": "string", + "description": "Cron schedule for automated backups", + "default": "0 2 * * *" + }, + "cleanupStrategy": { + "type": "string", + "description": "The strategy for cleaning up old backups", + "default": "--keep-last=3 --keep-daily=3 --keep-within-weekly=1m" + }, + "s3AccessKey": { + "type": "string", + "description": "The access key for S3, used for authentication", + "default": "oobaiRus9pah8PhohL1ThaeTa4UVa7gu" + }, + "s3SecretKey": { + "type": "string", + "description": "The secret key for S3, used for authentication", + "default": "ju3eum4dekeich9ahM1te8waeGai0oog" + }, + "resticPassword": { + "type": "string", + "description": "The password for Restic backup encryption", + "default": "ChaXoveekoh6eigh4siesheeda2quai0" + } + } + } + } +} \ No newline at end of file diff --git a/packages/apps/mysql/values.yaml b/packages/apps/mysql/values.yaml index 72ef8099..f3f53869 100644 --- a/packages/apps/mysql/values.yaml +++ b/packages/apps/mysql/values.yaml @@ -1,26 +1,50 @@ +## @section Common parameters + +## @param external Enable external access from outside the cluster +## @param size Persistent Volume size +## @param replicas Number of MariaDB replicas +## external: false size: 10Gi - replicas: 2 -users: - root: - password: strongpassword - user1: - privileges: ['ALL'] - maxUserConnections: 1000 - password: hackme - user2: - privileges: ['SELECT'] - maxUserConnections: 1000 - password: hackme +## @section Configuration parameters -databases: -- wordpress1 -- wordpress2 -- wordpress3 -- wordpress4 +## @param users [object] Users configuration +## Example: +## users: +## root: +## password: strongpassword +## user1: +## privileges: ['ALL'] +## maxUserConnections: 1000 +## password: hackme +## user2: +## privileges: ['SELECT'] +## maxUserConnections: 1000 +## password: hackme +## +users: {} +## @param databases Databases configuration +## Example: +## databases: +## - wordpress1 +## - wordpress2 +## - wordpress3 +## - wordpress4 +databases: [] + +## @section Backup parameters + +## @param backup.enabled Enable pereiodic backups +## @param backup.s3Region The AWS S3 region where backups are stored +## @param backup.s3Bucket The S3 bucket used for storing backups +## @param backup.schedule Cron schedule for automated backups +## @param backup.cleanupStrategy The strategy for cleaning up old backups +## @param backup.s3AccessKey The access key for S3, used for authentication +## @param backup.s3SecretKey The secret key for S3, used for authentication +## @param backup.resticPassword The password for Restic backup encryption backup: enabled: false s3Region: us-east-1 diff --git a/packages/apps/postgres/Makefile b/packages/apps/postgres/Makefile new file mode 100644 index 00000000..207e2133 --- /dev/null +++ b/packages/apps/postgres/Makefile @@ -0,0 +1,2 @@ +generate: + readme-generator -v values.yaml -s values.schema.json -r README.md diff --git a/packages/apps/postgres/README.md b/packages/apps/postgres/README.md index 6ca0c381..5bdf290f 100644 --- a/packages/apps/postgres/README.md +++ b/packages/apps/postgres/README.md @@ -30,3 +30,35 @@ restic -r s3:s3.example.org/postgres-backups/database_name restore latest --targ more details: - https://itnext.io/restic-effective-backup-from-stdin-4bc1e8f083c1 + +## Parameters + +### Common parameters + +| Name | Description | Value | +| ---------- | ----------------------------------------------- | ------- | +| `external` | Enable external access from outside the cluster | `false` | +| `size` | Persistent Volume size | `10Gi` | +| `replicas` | Number of MariaDB replicas | `2` | + +### Configuration parameters + +| Name | Description | Value | +| ----------- | ----------------------- | ----- | +| `users` | Users configuration | `{}` | +| `databases` | Databases configuration | `{}` | + +### Backup parameters + +| Name | Description | Value | +| ------------------------ | ---------------------------------------------- | ------------------------------------------------------ | +| `backup.enabled` | Enable pereiodic backups | `false` | +| `backup.s3Region` | The AWS S3 region where backups are stored | `us-east-1` | +| `backup.s3Bucket` | The S3 bucket used for storing backups | `s3.example.org/postgres-backups` | +| `backup.schedule` | Cron schedule for automated backups | `0 2 * * *` | +| `backup.cleanupStrategy` | The strategy for cleaning up old backups | `--keep-last=3 --keep-daily=3 --keep-within-weekly=1m` | +| `backup.s3AccessKey` | The access key for S3, used for authentication | `oobaiRus9pah8PhohL1ThaeTa4UVa7gu` | +| `backup.s3SecretKey` | The secret key for S3, used for authentication | `ju3eum4dekeich9ahM1te8waeGai0oog` | +| `backup.resticPassword` | The password for Restic backup encryption | `ChaXoveekoh6eigh4siesheeda2quai0` | + + diff --git a/packages/apps/postgres/values.schema.json b/packages/apps/postgres/values.schema.json new file mode 100644 index 00000000..11e09d44 --- /dev/null +++ b/packages/apps/postgres/values.schema.json @@ -0,0 +1,71 @@ +{ + "title": "Chart Values", + "type": "object", + "properties": { + "external": { + "type": "boolean", + "description": "Enable external access from outside the cluster", + "default": false + }, + "size": { + "type": "string", + "description": "Persistent Volume size", + "default": "10Gi" + }, + "replicas": { + "type": "number", + "description": "Number of MariaDB replicas", + "default": 2 + }, + "databases": { + "type": "object", + "description": "Databases configuration", + "default": {} + }, + "backup": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable pereiodic backups", + "default": false + }, + "s3Region": { + "type": "string", + "description": "The AWS S3 region where backups are stored", + "default": "us-east-1" + }, + "s3Bucket": { + "type": "string", + "description": "The S3 bucket used for storing backups", + "default": "s3.example.org/postgres-backups" + }, + "schedule": { + "type": "string", + "description": "Cron schedule for automated backups", + "default": "0 2 * * *" + }, + "cleanupStrategy": { + "type": "string", + "description": "The strategy for cleaning up old backups", + "default": "--keep-last=3 --keep-daily=3 --keep-within-weekly=1m" + }, + "s3AccessKey": { + "type": "string", + "description": "The access key for S3, used for authentication", + "default": "oobaiRus9pah8PhohL1ThaeTa4UVa7gu" + }, + "s3SecretKey": { + "type": "string", + "description": "The secret key for S3, used for authentication", + "default": "ju3eum4dekeich9ahM1te8waeGai0oog" + }, + "resticPassword": { + "type": "string", + "description": "The password for Restic backup encryption", + "default": "ChaXoveekoh6eigh4siesheeda2quai0" + } + } + } + } +} \ No newline at end of file diff --git a/packages/apps/postgres/values.yaml b/packages/apps/postgres/values.yaml index 0348ce02..2b7b49c1 100644 --- a/packages/apps/postgres/values.yaml +++ b/packages/apps/postgres/values.yaml @@ -1,34 +1,57 @@ +## @section Common parameters + +## @param external Enable external access from outside the cluster +## @param size Persistent Volume size +## @param replicas Number of MariaDB replicas +## external: false size: 10Gi replicas: 2 -users: - user1: - password: strongpassword - user2: - password: hackme - airflow: - password: qwerty123 - debezium: - replication: true +## @section Configuration parameters -databases: +## @param users [object] Users configuration +## Example: +## users: +## user1: +## password: strongpassword +## user2: +## password: hackme +## airflow: +## password: qwerty123 +## debezium: +## replication: true +## +users: {} - myapp: - roles: - admin: - - user1 - - debezium - readonly: - - user2 +## @param databases Databases configuration +## Example: +## databases: +## myapp: +## roles: +## admin: +## - user1 +## - debezium +## readonly: +## - user2 +## airflow: +## roles: +## admin: +## - airflow +## extensions: +## - hstore +databases: {} - airflow: - roles: - admin: - - airflow - extensions: - - hstore +## @section Backup parameters +## @param backup.enabled Enable pereiodic backups +## @param backup.s3Region The AWS S3 region where backups are stored +## @param backup.s3Bucket The S3 bucket used for storing backups +## @param backup.schedule Cron schedule for automated backups +## @param backup.cleanupStrategy The strategy for cleaning up old backups +## @param backup.s3AccessKey The access key for S3, used for authentication +## @param backup.s3SecretKey The secret key for S3, used for authentication +## @param backup.resticPassword The password for Restic backup encryption backup: enabled: false s3Region: us-east-1 diff --git a/packages/apps/rabbitmq/Makefile b/packages/apps/rabbitmq/Makefile new file mode 100644 index 00000000..207e2133 --- /dev/null +++ b/packages/apps/rabbitmq/Makefile @@ -0,0 +1,2 @@ +generate: + readme-generator -v values.yaml -s values.schema.json -r README.md diff --git a/packages/apps/rabbitmq/README.md b/packages/apps/rabbitmq/README.md index a3548b0f..d1cd0b08 100644 --- a/packages/apps/rabbitmq/README.md +++ b/packages/apps/rabbitmq/README.md @@ -8,3 +8,12 @@ The service utilizes official RabbitMQ operator. This ensures the reliability an - Github: https://github.com/rabbitmq/cluster-operator/ - Docs: https://www.rabbitmq.com/kubernetes/operator/operator-overview.html + +## Parameters + +### Common parameters + +| Name | Description | Value | +| ---------- | ----------------------------------------------- | ------- | +| `external` | Enable external access from outside the cluster | `false` | +| `replicas` | Number of RabbitMQ replicas | `3` | diff --git a/packages/apps/rabbitmq/values.schema.json b/packages/apps/rabbitmq/values.schema.json index 45d6206b..1c752ee4 100644 --- a/packages/apps/rabbitmq/values.schema.json +++ b/packages/apps/rabbitmq/values.schema.json @@ -1,14 +1,16 @@ { - "$schema": "http://json-schema.org/schema#", - "type": "object", - "properties": { - "external": { - "type": "boolean", - "title": "Enable external Access" - }, - "replicas": { - "type": "integer", - "title": "Replicas" + "title": "Chart Values", + "type": "object", + "properties": { + "external": { + "type": "boolean", + "description": "Enable external access from outside the cluster", + "default": false + }, + "replicas": { + "type": "number", + "description": "Number of RabbitMQ replicas", + "default": 3 + } } - } -} +} \ No newline at end of file diff --git a/packages/apps/rabbitmq/values.yaml b/packages/apps/rabbitmq/values.yaml index 67acc9b7..8918cc2a 100644 --- a/packages/apps/rabbitmq/values.yaml +++ b/packages/apps/rabbitmq/values.yaml @@ -1,2 +1,7 @@ -replicas: 3 +## @section Common parameters + +## @param external Enable external access from outside the cluster +## @param replicas Number of RabbitMQ replicas +## external: false +replicas: 3 diff --git a/packages/apps/redis/Makefile b/packages/apps/redis/Makefile new file mode 100644 index 00000000..207e2133 --- /dev/null +++ b/packages/apps/redis/Makefile @@ -0,0 +1,2 @@ +generate: + readme-generator -v values.yaml -s values.schema.json -r README.md diff --git a/packages/apps/redis/README.md b/packages/apps/redis/README.md index c57e0d7d..6dc7c432 100644 --- a/packages/apps/redis/README.md +++ b/packages/apps/redis/README.md @@ -8,3 +8,15 @@ Service utilizes the Spotahome Redis Operator for efficient management and orche - Docs: https://redis.io/docs/ - GitHub: https://github.com/spotahome/redis-operator + +## Parameters + +### Common parameters + +| Name | Description | Value | +| ---------- | ----------------------------------------------- | ------- | +| `external` | Enable external access from outside the cluster | `false` | +| `size` | Persistent Volume size | `1Gi` | +| `replicas` | Number of Redis replicas | `2` | + + diff --git a/packages/apps/redis/values.schema.json b/packages/apps/redis/values.schema.json index abf5910c..1a1013b2 100644 --- a/packages/apps/redis/values.schema.json +++ b/packages/apps/redis/values.schema.json @@ -1,18 +1,21 @@ { - "$schema": "http://json-schema.org/schema#", - "type": "object", - "properties": { - "external": { - "type": "boolean", - "title": "Enable external Access" - }, - "size": { - "type": "string", - "title": "Disk Size" - }, - "replicas": { - "type": "integer", - "title": "Replicas" + "title": "Chart Values", + "type": "object", + "properties": { + "external": { + "type": "boolean", + "description": "Enable external access from outside the cluster", + "default": false + }, + "size": { + "type": "string", + "description": "Persistent Volume size", + "default": "1Gi" + }, + "replicas": { + "type": "number", + "description": "Number of Redis replicas", + "default": 2 + } } - } -} +} \ No newline at end of file diff --git a/packages/apps/redis/values.yaml b/packages/apps/redis/values.yaml index 259663a4..00e99e0d 100644 --- a/packages/apps/redis/values.yaml +++ b/packages/apps/redis/values.yaml @@ -1,3 +1,9 @@ -replicas: 2 +## @section Common parameters + +## @param external Enable external access from outside the cluster +## @param size Persistent Volume size +## @param replicas Number of Redis replicas +## external: false -size: 5Gi +size: 1Gi +replicas: 2 diff --git a/packages/apps/tcp-balancer/Makefile b/packages/apps/tcp-balancer/Makefile new file mode 100644 index 00000000..acb3b034 --- /dev/null +++ b/packages/apps/tcp-balancer/Makefile @@ -0,0 +1,4 @@ +generate: + readme-generator -v values.yaml -s values.schema.json.tmp -r README.md + cat values.schema.json.tmp | jq '.properties.httpAndHttps.properties.mode.enum = ["tcp","tcp-with-proxy"]' > values.schema.json + rm -f values.schema.json.tmp diff --git a/packages/apps/tcp-balancer/README.md b/packages/apps/tcp-balancer/README.md index ff4aab25..1e5d7dd9 100644 --- a/packages/apps/tcp-balancer/README.md +++ b/packages/apps/tcp-balancer/README.md @@ -7,3 +7,23 @@ The Managed TCP Load Balancer Service simplifies the deployment and management o Managed TCP Load Balancer Service efficiently utilizes HAProxy for load balancing purposes. HAProxy is a well-established and reliable solution for distributing incoming TCP traffic across multiple backend servers, ensuring high availability and efficient resource utilization. This deployment choice guarantees the seamless and dependable operation of your load balancing infrastructure. - Docs: https://www.haproxy.com/documentation/ + +## Parameters + +### Common parameters + +| Name | Description | Value | +| ---------- | ----------------------------------------------- | ------- | +| `external` | Enable external access from outside the cluster | `false` | +| `replicas` | Number of HAProxy replicas | `2` | + +### Configuration parameters + +| Name | Description | Value | +| -------------------------------- | ------------------------------------------------------------- | ------- | +| `httpAndHttps.mode` | Mode for balancer. Allowed values: `tcp` and `tcp-with-proxy` | `tcp` | +| `httpAndHttps.targetPorts.http` | HTTP port number. | `80` | +| `httpAndHttps.targetPorts.https` | HTTPS port number. | `443` | +| `httpAndHttps.endpoints` | Endpoint addresses list | `[]` | +| `whitelistHTTP` | Secure HTTP by enabling client networks whitelisting | `false` | +| `whitelist` | List of client networks | `[]` | diff --git a/packages/apps/tcp-balancer/values.schema.json b/packages/apps/tcp-balancer/values.schema.json new file mode 100644 index 00000000..43cf639d --- /dev/null +++ b/packages/apps/tcp-balancer/values.schema.json @@ -0,0 +1,62 @@ +{ + "title": "Chart Values", + "type": "object", + "properties": { + "external": { + "type": "boolean", + "description": "Enable external access from outside the cluster", + "default": false + }, + "replicas": { + "type": "number", + "description": "Number of HAProxy replicas", + "default": 2 + }, + "httpAndHttps": { + "type": "object", + "properties": { + "mode": { + "type": "string", + "description": "Mode for balancer. Allowed values: `tcp` and `tcp-with-proxy`", + "default": "tcp", + "enum": [ + "tcp", + "tcp-with-proxy" + ] + }, + "targetPorts": { + "type": "object", + "properties": { + "http": { + "type": "number", + "description": "HTTP port number.", + "default": 80 + }, + "https": { + "type": "number", + "description": "HTTPS port number.", + "default": 443 + } + } + }, + "endpoints": { + "type": "array", + "description": "Endpoint addresses list", + "default": [], + "items": {} + } + } + }, + "whitelistHTTP": { + "type": "boolean", + "description": "Secure HTTP by enabling client networks whitelisting", + "default": false + }, + "whitelist": { + "type": "array", + "description": "List of client networks", + "default": [], + "items": {} + } + } +} diff --git a/packages/apps/tcp-balancer/values.yaml b/packages/apps/tcp-balancer/values.yaml index fa9ffa7d..439283f0 100644 --- a/packages/apps/tcp-balancer/values.yaml +++ b/packages/apps/tcp-balancer/values.yaml @@ -1,19 +1,45 @@ +## @section Common parameters + +## @param external Enable external access from outside the cluster +## @param replicas Number of HAProxy replicas +## external: false replicas: 2 + +## @section Configuration parameters + +## @param httpAndHttps.mode Mode for balancer. Allowed values: `tcp` and `tcp-with-proxy` +## @param httpAndHttps.targetPorts.http HTTP port number. +## @param httpAndHttps.targetPorts.https HTTPS port number. +## @param httpAndHttps.endpoints Endpoint addresses list +## Example: +## httpAndHttps: +## mode: tcp +## targetPorts: +## http: 80 +## https: 443 +## endpoints: +## - 10.100.3.1 +## - 10.100.3.11 +## - 10.100.3.2 +## - 10.100.3.12 +## - 10.100.3.3 +## - 10.100.3.13 + httpAndHttps: mode: tcp targetPorts: http: 80 https: 443 - endpoints: - - 10.100.3.1 - - 10.100.3.11 - - 10.100.3.2 - - 10.100.3.12 - - 10.100.3.3 - - 10.100.3.13 + endpoints: [] +## @param whitelistHTTP Secure HTTP by enabling client networks whitelisting +## @param whitelist List of client networks +## Example: +## whitelistHTTP: true +## whitelist: +## - "1.2.3.4" +## - "10.100.0.0/16" +## whitelistHTTP: false -whitelist: -- "1.2.3.4" -- "10.100.0.0/16" +whitelist: [] diff --git a/packages/apps/tenant/Chart.yaml b/packages/apps/tenant/Chart.yaml index 176d24b9..9ea4afc6 100644 --- a/packages/apps/tenant/Chart.yaml +++ b/packages/apps/tenant/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: tenant -description: Additional tenant namespace +description: Separated tenant namespace icon: https://upload.wikimedia.org/wikipedia/commons/0/04/User_icon_1.svg type: application -version: 1.0.0 +version: 1.1.0 diff --git a/packages/apps/tenant/Makefile b/packages/apps/tenant/Makefile new file mode 100644 index 00000000..207e2133 --- /dev/null +++ b/packages/apps/tenant/Makefile @@ -0,0 +1,2 @@ +generate: + readme-generator -v values.yaml -s values.schema.json -r README.md diff --git a/packages/apps/tenant/README.md b/packages/apps/tenant/README.md index d1c4bfed..d33ecc7b 100644 --- a/packages/apps/tenant/README.md +++ b/packages/apps/tenant/README.md @@ -45,3 +45,14 @@ tenant-u1 ├── kubernetes-cluster1 └── postgres-db1 ``` + +## Parameters + +### Common parameters + +| Name | Description | Value | +| ------------ | --------------------------------------------------------------------------------------------------------------------------- | ------- | +| `host` | The hostname used to access tenant services (defaults to using the tenant name as a subdomain for it's parent tenant host). | `""` | +| `etcd` | Deploy own Etcd cluster | `false` | +| `monitoring` | Deploy own Monitoring Stack | `false` | +| `ingress` | Deploy own Ingress Controller | `false` | diff --git a/packages/apps/tenant/values.schema.json b/packages/apps/tenant/values.schema.json index 09b56a97..a02ffa71 100644 --- a/packages/apps/tenant/values.schema.json +++ b/packages/apps/tenant/values.schema.json @@ -1,27 +1,26 @@ { - "$schema": "http://json-schema.org/schema#", - "type": "object", - "properties": { - "host": { - "type": "string", - "form": true, - "title": "Domain name for this tenant", - "description": "This host will be used for all apps deployed in this tenant" - }, - "etcd": { - "type": "boolean", - "title": "Deploy own Etcd cluster", - "form": true - }, - "monitoring": { - "type": "boolean", - "title": "Deploy own Monitoring Stack", - "form": true - }, - "ingress": { - "type": "boolean", - "title": "Deploy own Ingress Controller", - "form": true + "title": "Chart Values", + "type": "object", + "properties": { + "host": { + "type": "string", + "description": "The hostname used to access tenant services (defaults to using the tenant name as a subdomain for it's parent tenant host).", + "default": "" + }, + "etcd": { + "type": "boolean", + "description": "Deploy own Etcd cluster", + "default": false + }, + "monitoring": { + "type": "boolean", + "description": "Deploy own Monitoring Stack", + "default": false + }, + "ingress": { + "type": "boolean", + "description": "Deploy own Ingress Controller", + "default": false + } } - } -} +} \ No newline at end of file diff --git a/packages/apps/tenant/values.yaml b/packages/apps/tenant/values.yaml index 8ba52851..3c980c00 100644 --- a/packages/apps/tenant/values.yaml +++ b/packages/apps/tenant/values.yaml @@ -1,3 +1,9 @@ +## @section Common parameters + +## @param host The hostname used to access tenant services (defaults to using the tenant name as a subdomain for it's parent tenant host). +## @param etcd Deploy own Etcd cluster +## @param monitoring Deploy own Monitoring Stack +## @param ingress Deploy own Ingress Controller host: "" etcd: false monitoring: false diff --git a/packages/apps/versions_map b/packages/apps/versions_map index 6f26de2e..c7288590 100644 --- a/packages/apps/versions_map +++ b/packages/apps/versions_map @@ -2,7 +2,8 @@ clickhouse 0.1.0 ca79f72 clickhouse 0.2.0 HEAD http-cache 0.1.0 a956713 http-cache 0.2.0 HEAD -kafka 0.1.0 HEAD +kafka 0.1.0 760f86d2 +kafka 0.2.0 HEAD kubernetes 0.1.0 f642698 kubernetes 0.2.0 HEAD mysql 0.1.0 f642698 @@ -19,8 +20,10 @@ tcp-balancer 0.2.0 HEAD tenant 0.1.3 3d1b86c tenant 0.1.4 d200480 tenant 0.1.5 e3ab858 -tenant 1.0.0 HEAD +tenant 1.0.0 7cd7de7 +tenant 1.1.0 HEAD virtual-machine 0.1.4 f2015d6 -virtual-machine 0.1.5 HEAD +virtual-machine 0.1.5 7cd7de7 +virtual-machine 0.2.0 HEAD vpn 0.1.0 f642698 vpn 0.2.0 HEAD diff --git a/packages/apps/virtual-machine/Chart.yaml b/packages/apps/virtual-machine/Chart.yaml index cbee4502..1e2a3c5a 100644 --- a/packages/apps/virtual-machine/Chart.yaml +++ b/packages/apps/virtual-machine/Chart.yaml @@ -17,7 +17,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.5 +version: 0.2.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/packages/apps/virtual-machine/Makefile b/packages/apps/virtual-machine/Makefile new file mode 100644 index 00000000..ee879e83 --- /dev/null +++ b/packages/apps/virtual-machine/Makefile @@ -0,0 +1,7 @@ +generate: + readme-generator -v values.yaml -s values.schema.json.tmp -r README.md + cat values.schema.json.tmp | \ + jq '.properties.image.enum = ["ubuntu", "cirros", "alpine", "fedora"]' | \ + jq '.properties.resources.properties.memory["x-display"] = "slider"' \ + > values.schema.json + rm -f values.schema.json.tmp diff --git a/packages/apps/virtual-machine/README.md b/packages/apps/virtual-machine/README.md index aa6e2b7b..b1d5c6ec 100644 --- a/packages/apps/virtual-machine/README.md +++ b/packages/apps/virtual-machine/README.md @@ -8,3 +8,17 @@ The virtual machine is managed and hosted through KubeVirt, allowing you to harn - Docs: https://kubevirt.io/user-guide/ - GitHub: https://github.com/kubevirt/kubevirt + +## Parameters + +### Common parameters + +| Name | Description | Value | +| ------------------ | ------------------------------------------------------------------------------------------------- | -------- | +| `external` | Enable external access from outside the cluster | `false` | +| `running` | Determines if the virtual machine should be running | `true` | +| `password` | The default password for the virtual machine | `hackme` | +| `image` | The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine` and `fedora` | `ubuntu` | +| `disk` | The size of the disk allocated for the virtual machine | `5Gi` | +| `resources.cpu` | The number of CPU cores allocated to the virtual machine | `1` | +| `resources.memory` | The amount of memory allocated to the virtual machine | `1024M` | diff --git a/packages/apps/virtual-machine/values.schema.json b/packages/apps/virtual-machine/values.schema.json index 0915a5e5..eda05ecb 100644 --- a/packages/apps/virtual-machine/values.schema.json +++ b/packages/apps/virtual-machine/values.schema.json @@ -1,44 +1,51 @@ { - "$schema": "http://json-schema.org/schema#", + "title": "Chart Values", "type": "object", "properties": { - "running": { - "type": "boolean", - "title": "Running" - }, "external": { "type": "boolean", - "title": "Enable external Access" + "description": "Enable external access from outside the cluster", + "default": false }, - "image": { - "type": "string", - "form": true, - "enum": ["ubuntu", "cirros", "alpine", "fedora"], - "title": "Choose image" + "running": { + "type": "boolean", + "description": "Determines if the virtual machine should be running", + "default": true }, "password": { "type": "string", - "title": "Password" + "description": "The default password for the virtual machine", + "default": "hackme" + }, + "image": { + "type": "string", + "description": "The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine` and `fedora`", + "default": "ubuntu", + "enum": [ + "ubuntu", + "cirros", + "alpine", + "fedora" + ] }, "disk": { "type": "string", - "title": "Disk Size" + "description": "The size of the disk allocated for the virtual machine", + "default": "5Gi" }, "resources": { "type": "object", "properties": { + "cpu": { + "type": "number", + "description": "The number of CPU cores allocated to the virtual machine", + "default": 1 + }, "memory": { "type": "string", - "x-display": "slider", - "title": "Memory", - "minimum": 10, - "maximum": 2048 - }, - "cpu": { - "type": "integer", - "title": "CPU", - "minimum": 1, - "maximum": 4 + "description": "The amount of memory allocated to the virtual machine", + "default": "1024M", + "x-display": "slider" } } } diff --git a/packages/apps/virtual-machine/values.yaml b/packages/apps/virtual-machine/values.yaml index 6ba783de..19b37d64 100644 --- a/packages/apps/virtual-machine/values.yaml +++ b/packages/apps/virtual-machine/values.yaml @@ -1,3 +1,13 @@ +## @section Common parameters + +## @param external Enable external access from outside the cluster +## @param running Determines if the virtual machine should be running +## @param password The default password for the virtual machine +## @param image The base image for the virtual machine. Allowed values: `ubuntu`, `cirros`, `alpine` and `fedora` +## @param disk The size of the disk allocated for the virtual machine +## @param resources.cpu The number of CPU cores allocated to the virtual machine +## @param resources.memory The amount of memory allocated to the virtual machine + external: false running: true password: hackme diff --git a/packages/apps/vpn/Makefile b/packages/apps/vpn/Makefile new file mode 100644 index 00000000..207e2133 --- /dev/null +++ b/packages/apps/vpn/Makefile @@ -0,0 +1,2 @@ +generate: + readme-generator -v values.yaml -s values.schema.json -r README.md diff --git a/packages/apps/vpn/README.md b/packages/apps/vpn/README.md index 9275f56a..9ab798ca 100644 --- a/packages/apps/vpn/README.md +++ b/packages/apps/vpn/README.md @@ -10,3 +10,18 @@ The VPN Service is powered by the Outline Server, an advanced and user-friendly - Docs: https://shadowsocks.org/ - Docs: https://github.com/Jigsaw-Code/outline-server/tree/master/src/shadowbox + +## Parameters + +### Common parameters + +| Name | Description | Value | +| ---------- | ----------------------------------------------- | ------- | +| `external` | Enable external access from outside the cluster | `false` | +| `replicas` | Number of VPN-server replicas | `2` | + +### Configuration parameters + +| Name | Description | Value | +| ------- | ------------------- | ----- | +| `users` | Users configuration | `{}` | diff --git a/packages/apps/vpn/values.schema.json b/packages/apps/vpn/values.schema.json new file mode 100644 index 00000000..16bc7c66 --- /dev/null +++ b/packages/apps/vpn/values.schema.json @@ -0,0 +1,16 @@ +{ + "title": "Chart Values", + "type": "object", + "properties": { + "external": { + "type": "boolean", + "description": "Enable external access from outside the cluster", + "default": false + }, + "replicas": { + "type": "number", + "description": "Number of VPN-server replicas", + "default": 2 + } + } +} \ No newline at end of file diff --git a/packages/apps/vpn/values.yaml b/packages/apps/vpn/values.yaml index a7f0e5b5..150a8060 100644 --- a/packages/apps/vpn/values.yaml +++ b/packages/apps/vpn/values.yaml @@ -1,8 +1,18 @@ +## @section Common parameters + +## @param external Enable external access from outside the cluster +## @param replicas Number of VPN-server replicas +## external: false replicas: 2 -users: - user1: - password: hackme - user2: - password: tttt +## @section Configuration parameters + +## @param users [object] Users configuration +## Example: +## users: +## user1: +## password: hackme +## user2: +## password: tttt +users: {} diff --git a/packages/core/installer/images/cozystack.json b/packages/core/installer/images/cozystack.json index fea11ac0..4b535def 100644 --- a/packages/core/installer/images/cozystack.json +++ b/packages/core/installer/images/cozystack.json @@ -1,4 +1,4 @@ { - "containerimage.config.digest": "sha256:aefc3ca9f56f69270d7ce6f56a1ce5b531332d5641481eb54c8e74b66b0f3341", - "containerimage.digest": "sha256:a2bf43cb7eb812166edfeb1a4fae6a76a4ddba93be2c0ba9040a804ccb53c261" + "containerimage.config.digest": "sha256:cf9793f2de9d8f1400234a73f9446f3f9876b807463dae985d3cef4aafb33aae", + "containerimage.digest": "sha256:ce3d54b388d9027ed6ca2d3d67b1759e9f061e5736f61a75d586f33a1ee19fa4" } \ No newline at end of file diff --git a/packages/extra/etcd/Makefile b/packages/extra/etcd/Makefile new file mode 100644 index 00000000..207e2133 --- /dev/null +++ b/packages/extra/etcd/Makefile @@ -0,0 +1,2 @@ +generate: + readme-generator -v values.yaml -s values.schema.json -r README.md diff --git a/packages/extra/etcd/README.md b/packages/extra/etcd/README.md new file mode 100644 index 00000000..2e57b37e --- /dev/null +++ b/packages/extra/etcd/README.md @@ -0,0 +1,10 @@ +# Etcd-cluster + +## Parameters + +### Common parameters + +| Name | Description | Value | +| ---------- | ----------------------- | ----- | +| `size` | Persistent Volume size | `4Gi` | +| `replicas` | Number of etcd replicas | `3` | diff --git a/packages/extra/etcd/templates/datastore.yaml b/packages/extra/etcd/templates/datastore.yaml index 1398dc9c..591f6519 100644 --- a/packages/extra/etcd/templates/datastore.yaml +++ b/packages/extra/etcd/templates/datastore.yaml @@ -6,9 +6,9 @@ metadata: spec: driver: etcd endpoints: - - etcd-0.etcd-headless.{{ .Release.Namespace }}.svc:2379 - - etcd-1.etcd-headless.{{ .Release.Namespace }}.svc:2379 - - etcd-2.etcd-headless.{{ .Release.Namespace }}.svc:2379 + {{- range $i := until (int $.Values.replicas) }} + - etcd-{{ $i }}.etcd-headless.{{ $.Release.Namespace }}.svc:2379 + {{- end }} tlsConfig: certificateAuthority: certificate: @@ -47,4 +47,4 @@ metadata: name: etcd-client-tls annotations: helm.sh/hook: pre-install - helm.sh/resource-policy: keep + helm.sh/resource-policy: keep \ No newline at end of file diff --git a/packages/extra/etcd/templates/etcd-cluster.yaml b/packages/extra/etcd/templates/etcd-cluster.yaml index 42e05950..a1f05c89 100644 --- a/packages/extra/etcd/templates/etcd-cluster.yaml +++ b/packages/extra/etcd/templates/etcd-cluster.yaml @@ -4,7 +4,13 @@ kind: EtcdCluster metadata: name: etcd spec: - storage: {} + replicas: {{ .Values.replicas }} + storage: + volumeClaimTemplate: + spec: + resources: + requests: + storage: {{ .Values.size }} security: tls: peerTrustedCASecret: etcd-peer-ca-tls @@ -107,15 +113,11 @@ spec: - "signing" - "key encipherment" dnsNames: - - etcd-0 - - etcd-0.etcd-headless - - etcd-0.etcd-headless.{{ .Release.Namespace }}.svc - - etcd-1 - - etcd-1.etcd-headless - - etcd-1.etcd-headless.{{ .Release.Namespace }}.svc - - etcd-2 - - etcd-2.etcd-headless - - etcd-2.etcd-headless.{{ .Release.Namespace }}.svc + {{- range $i := until (int $.Values.replicas) }} + - etcd-{{ $i }} + - etcd-{{ $i }}.etcd-headless + - etcd-{{ $i }}.etcd-headless.{{ $.Release.Namespace }}.svc + {{- end }} - localhost - "127.0.0.1" privateKey: @@ -138,15 +140,11 @@ spec: - "signing" - "key encipherment" dnsNames: - - etcd-0 - - etcd-0.etcd-headless - - etcd-0.etcd-headless.{{ .Release.Namespace }}.svc - - etcd-1 - - etcd-1.etcd-headless - - etcd-1.etcd-headless.{{ .Release.Namespace }}.svc - - etcd-2 - - etcd-2.etcd-headless - - etcd-2.etcd-headless.{{ .Release.Namespace }}.svc + {{- range $i := until (int $.Values.replicas) }} + - etcd-{{ $i }} + - etcd-{{ $i }}.etcd-headless + - etcd-{{ $i }}.etcd-headless.{{ $.Release.Namespace }}.svc + {{- end }} - localhost - "127.0.0.1" privateKey: diff --git a/packages/extra/etcd/values.schema.json b/packages/extra/etcd/values.schema.json new file mode 100644 index 00000000..de375028 --- /dev/null +++ b/packages/extra/etcd/values.schema.json @@ -0,0 +1,16 @@ +{ + "title": "Chart Values", + "type": "object", + "properties": { + "size": { + "type": "string", + "description": "Persistent Volume size", + "default": "4Gi" + }, + "replicas": { + "type": "number", + "description": "Number of etcd replicas", + "default": 3 + } + } +} \ No newline at end of file diff --git a/packages/extra/etcd/values.yaml b/packages/extra/etcd/values.yaml new file mode 100644 index 00000000..5f912f11 --- /dev/null +++ b/packages/extra/etcd/values.yaml @@ -0,0 +1,7 @@ +## @section Common parameters + +## @param size Persistent Volume size +## @param replicas Number of etcd replicas +## +size: 4Gi +replicas: 3 diff --git a/packages/extra/ingress/Makefile b/packages/extra/ingress/Makefile new file mode 100644 index 00000000..207e2133 --- /dev/null +++ b/packages/extra/ingress/Makefile @@ -0,0 +1,2 @@ +generate: + readme-generator -v values.yaml -s values.schema.json -r README.md diff --git a/packages/extra/ingress/README.md b/packages/extra/ingress/README.md new file mode 100644 index 00000000..ceac2640 --- /dev/null +++ b/packages/extra/ingress/README.md @@ -0,0 +1,9 @@ +# Ingress-NGINX Controller + +## Parameters + +### Common parameters + +| Name | Description | Value | +| ---------- | -------------------------------- | ----- | +| `replicas` | Number of ingress-nginx replicas | `2` | diff --git a/packages/extra/ingress/templates/nginx-ingress.yaml b/packages/extra/ingress/templates/nginx-ingress.yaml index f7d72e2c..68a5c18c 100644 --- a/packages/extra/ingress/templates/nginx-ingress.yaml +++ b/packages/extra/ingress/templates/nginx-ingress.yaml @@ -18,6 +18,7 @@ spec: ingress-nginx: fullnameOverride: {{ trimPrefix "tenant-" .Release.Namespace }}-ingress controller: + replicaCount: {{ .Values.replicas }} ingressClass: {{ .Release.Namespace }} ingressClassResource: name: {{ .Release.Namespace }} diff --git a/packages/extra/ingress/values.schema.json b/packages/extra/ingress/values.schema.json new file mode 100644 index 00000000..05987fd2 --- /dev/null +++ b/packages/extra/ingress/values.schema.json @@ -0,0 +1,11 @@ +{ + "title": "Chart Values", + "type": "object", + "properties": { + "replicas": { + "type": "number", + "description": "Number of ingress-nginx replicas", + "default": 2 + } + } +} \ No newline at end of file diff --git a/packages/extra/ingress/values.yaml b/packages/extra/ingress/values.yaml new file mode 100644 index 00000000..bf98d04c --- /dev/null +++ b/packages/extra/ingress/values.yaml @@ -0,0 +1,5 @@ +## @section Common parameters + +## @param replicas Number of ingress-nginx replicas +## +replicas: 2 diff --git a/packages/extra/monitoring/Makefile b/packages/extra/monitoring/Makefile new file mode 100644 index 00000000..f9da9796 --- /dev/null +++ b/packages/extra/monitoring/Makefile @@ -0,0 +1,6 @@ +generate: + readme-generator -v values.yaml -s values.schema.json.tmp -r README.md + cat values.schema.json.tmp | \ + jq '.properties.metricsStorages.items.type = "object"' \ + > values.schema.json + rm -f values.schema.json.tmp diff --git a/packages/extra/monitoring/README.md b/packages/extra/monitoring/README.md new file mode 100644 index 00000000..42d68d28 --- /dev/null +++ b/packages/extra/monitoring/README.md @@ -0,0 +1,11 @@ +# Monitoring Hub + +## Parameters + +### Common parameters + +| Name | Description | Value | +| ----------------- | --------------------------------------------------------------------------------------------------------- | ------- | +| `host` | The hostname used to access the grafana externally (defaults to 'grafana' subdomain for the tenant host). | `""` | +| `metricsStorages` | Configuration of metrics storage instances | `[]` | +| `oncall.enabled` | Enable Grafana OnCall | `false` | diff --git a/packages/extra/monitoring/values.schema.json b/packages/extra/monitoring/values.schema.json new file mode 100644 index 00000000..0cacfcf1 --- /dev/null +++ b/packages/extra/monitoring/values.schema.json @@ -0,0 +1,29 @@ +{ + "title": "Chart Values", + "type": "object", + "properties": { + "host": { + "type": "string", + "description": "The hostname used to access the grafana externally (defaults to 'grafana' subdomain for the tenant host).", + "default": "" + }, + "metricsStorages": { + "type": "array", + "description": "Configuration of metrics storage instances", + "default": "[]", + "items": { + "type": "object" + } + }, + "oncall": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable Grafana OnCall", + "default": false + } + } + } + } +} diff --git a/packages/extra/monitoring/values.yaml b/packages/extra/monitoring/values.yaml index 0d322e74..fd7d16b4 100644 --- a/packages/extra/monitoring/values.yaml +++ b/packages/extra/monitoring/values.yaml @@ -1,5 +1,10 @@ +## @section Common parameters + +## @param host The hostname used to access the grafana externally (defaults to 'grafana' subdomain for the tenant host). host: "" +## @param metricsStorages [array] Configuration of metrics storage instances +## metricsStorages: - name: shortterm retentionPeriod: "3d" @@ -10,5 +15,7 @@ metricsStorages: deduplicationInterval: "15s" storage: 10Gi +## @param oncall.enabled Enable Grafana OnCall +## oncall: enabled: false diff --git a/packages/system/dashboard/images/kubeapps-apis.json b/packages/system/dashboard/images/kubeapps-apis.json index 0af497d7..c381203f 100644 --- a/packages/system/dashboard/images/kubeapps-apis.json +++ b/packages/system/dashboard/images/kubeapps-apis.json @@ -1,4 +1,4 @@ { - "containerimage.config.digest": "sha256:273a8e7055816068b2975d8ac10f0f7d114cafef74057680ffc60414d4d8cf4c", - "containerimage.digest": "sha256:5e111f09ee9c34281e2ef02cb0d41700943f8c036014110765bb002831148547" + "containerimage.config.digest": "sha256:bfc18fe2675fa774463e6de108e6a474b7b8c1601027f6160208e493fe2cbfde", + "containerimage.digest": "sha256:2c5c2e9b123d9a795bb17f33755a826e98c1bd537544d21c9cd395ad509ecb25" } \ No newline at end of file