From 86fca10fe99b05830b5170aa5c62b00d016242a2 Mon Sep 17 00:00:00 2001 From: Andres Martinez Gotor Date: Fri, 25 Oct 2019 11:33:39 +0200 Subject: [PATCH] Add JSON Schema to Ghost chart (#18198) Signed-off-by: Andres Martinez Gotor --- stable/ghost/Chart.yaml | 2 +- stable/ghost/README.md | 6 +- stable/ghost/values.schema.json | 133 ++++++++++++++++++++++++++++++++ stable/ghost/values.yaml | 17 ++-- 4 files changed, 146 insertions(+), 12 deletions(-) create mode 100644 stable/ghost/values.schema.json diff --git a/stable/ghost/Chart.yaml b/stable/ghost/Chart.yaml index 91924799ac..c1de2061ae 100644 --- a/stable/ghost/Chart.yaml +++ b/stable/ghost/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: ghost -version: 7.2.12 +version: 7.3.0 appVersion: 2.37.0 description: A simple, powerful publishing platform that allows you to share your stories with the world keywords: diff --git a/stable/ghost/README.md b/stable/ghost/README.md index 1749be2b4e..e4db7ed4ba 100644 --- a/stable/ghost/README.md +++ b/stable/ghost/README.md @@ -100,10 +100,10 @@ The following table lists the configurable parameters of the Ghost chart and the | `ingress.secrets[0].name` | TLS Secret Name | `nil` | | `ingress.secrets[0].certificate` | TLS Secret Certificate | `nil` | | `ingress.secrets[0].key` | TLS Secret Key | `nil` | -| `externalDatabase.host` | Host of the external database | `nil` | -| `externalDatabase.port` | Port of the external database | `nil` | +| `externalDatabase.host` | Host of the external database | `localhost` | +| `externalDatabase.port` | Port of the external database | `3306` | | `externalDatabase.user` | Existing username in the external db | `bn_ghost` | -| `externalDatabase.password` | Password for the above username | `nil` | +| `externalDatabase.password` | Password for the above username | `""` | | `externalDatabase.database` | Name of the existing database | `bitnami_ghost` | | `mariadb.enabled` | Whether or not to install MariaDB (disable if using external) | `true` | | `mariadb.rootUser.password` | MariaDB admin password | `nil` | diff --git a/stable/ghost/values.schema.json b/stable/ghost/values.schema.json new file mode 100644 index 0000000000..c67a447890 --- /dev/null +++ b/stable/ghost/values.schema.json @@ -0,0 +1,133 @@ +{ + "$schema": "http://json-schema.org/schema#", + "type": "object", + "properties": { + "ghostUsername": { + "type": "string", + "title": "User", + "form": "username" + }, + "ghostPassword": { + "type": "string", + "title": "Password", + "form": "password", + "description": "Defaults to a random 10-character alphanumeric string if not set" + }, + "ghostEmail": { + "type": "string", + "title": "Admin email", + "form": "email" + }, + "ghostBlogTitle": { + "type": "string", + "title": "Blog Name", + "form": "blogName" + }, + "ghostHost": { + "type": "string", + "title": "Host", + "form": "host", + "description": "Hostname used to generate application URLs" + }, + "persistence": { + "type": "object", + "properties": { + "size": { + "type": "string", + "title": "Disk Size", + "form": "diskSize", + "render": "slider", + "sliderMin": 1, + "sliderMax": 100, + "sliderUnit": "Gi" + } + } + }, + "mariadb": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Use a new MariaDB database hosted in the cluster", + "form": "useSelfHostedDatabase", + "disables": "externalDatabase", + "description": "Whether to deploy a mariadb server to satisfy the applications database requirements. To use an external database switch this off and configure the external database parameters" + } + } + }, + "externalDatabase": { + "type": "object", + "title": "External Database Details", + "form": "externalDatabase", + "properties": { + "host": { + "type": "string", + "form": "externalDatabaseHost", + "title": "Database Host" + }, + "user": { + "type": "string", + "form": "externalDatabaseUser", + "title": "Database Username" + }, + "password": { + "type": "string", + "form": "externalDatabasePassword", + "title": "Database Password" + }, + "database": { + "type": "string", + "form": "externalDatabaseName", + "title": "Database Name" + }, + "port": { + "type": "integer", + "form": "externalDatabasePort", + "title": "Database Port" + } + } + }, + "resources": { + "type": "object", + "title": "Required Resources", + "description": "Configure resource requests", + "form": "resources", + "properties": { + "requests": { + "type": "object", + "properties": { + "memory": { + "type": "string", + "form": "memoryRequest", + "render": "slider", + "title": "Memory Request", + "sliderMin": 10, + "sliderMax": 2048, + "sliderUnit": "Mi" + }, + "cpu": { + "type": "string", + "form": "cpuRequest", + "render": "slider", + "title": "CPU Request", + "sliderMin": 10, + "sliderMax": 2000, + "sliderUnit": "m" + } + } + } + } + }, + "securityContext": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enable Pod Security Context", + "description": "When disabled, an initContainer will be used to set required folder permissions", + "form": "enableSecurityContext" + } + } + } + } +} diff --git a/stable/ghost/values.yaml b/stable/ghost/values.yaml index 1194dda564..7bf50dca5c 100644 --- a/stable/ghost/values.yaml +++ b/stable/ghost/values.yaml @@ -98,20 +98,21 @@ allowEmptyPassword: "yes" ## External database configuration ## externalDatabase: + ## All of these values are only used when mariadb.enabled is set to false ## Database host - # host: + host: localhost - ## Database port - # port: - - ## Database user - # user: bn_ghost + ## non-root Username for Wordpress Database + user: bn_ghost ## Database password - # password: + password: "" ## Database name - # database: bitnami_ghost + database: bitnami_ghost + + ## Database port number + port: 3306 ## ## MariaDB chart configuration