From 27414b77ca2f6b59450e0901c958415f2d214603 Mon Sep 17 00:00:00 2001 From: Adam Dobrawy Date: Tue, 25 Jan 2022 12:45:20 +0100 Subject: [PATCH] fix(helm): fix relax required parameters for postgres & redis password, apply review comments --- helm/superset/values.schema.json | 85 +++++++++++--------------------- helm/superset/values.yaml | 4 +- 2 files changed, 31 insertions(+), 58 deletions(-) diff --git a/helm/superset/values.schema.json b/helm/superset/values.schema.json index eca2ff7d9882c..13e695c226456 100644 --- a/helm/superset/values.schema.json +++ b/helm/superset/values.schema.json @@ -56,7 +56,9 @@ }, "configOverrides": { "type": "object", - "additionalProperties": false, + "additionalProperties": { + "type": "string" + }, "properties": { "extend_timeout": { "type": "string" @@ -68,7 +70,9 @@ }, "configOverridesFiles": { "type": "object", - "additionalProperties": false, + "additionalProperties": { + "type": "string" + }, "properties": { "extend_timeout": { "type": "string" @@ -180,40 +184,10 @@ ] }, "resources": { - "type": "object", - "additionalProperties": false, - "properties": { - "limits": { - "type": "object", - "additionalProperties": false, - "properties": { - "cpu": { - "type": "string" - }, - "memory": { - "type": "string" - } - } - } - } + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.Container/properties/resources" }, "hostAliases": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "ip": { - "type": "string" - }, - "hostnames": { - "type": "array", - "items": { - "type": "string" - } - } - } - } + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.PodSpec/properties/hostAliases" }, "supersetNode": { "type": "object", @@ -278,9 +252,7 @@ "command", "connections", "env", - "forceReload", - "deploymentAnnotations", - "podAnnotations" + "forceReload" ] }, "supersetWorker": { @@ -305,9 +277,7 @@ }, "required": [ "command", - "forceReload", - "deploymentAnnotations", - "podAnnotations" + "forceReload" ] }, "supersetCeleryBeat": { @@ -336,9 +306,7 @@ "required": [ "enabled", "command", - "forceReload", - "deploymentAnnotations", - "podAnnotations" + "forceReload" ] }, "init": { @@ -395,7 +363,7 @@ "type": "string" }, "podAnnotations": { - "type": "object" + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta/properties/annotations" } }, "required": [ @@ -405,8 +373,7 @@ "loadExamples", "createAdmin", "adminUser", - "initscript", - "podAnnotations" + "initscript" ] }, "postgresql": { @@ -417,10 +384,16 @@ "type": "boolean" }, "existingSecret": { - "type": "string" + "type": [ + "string", + "null" + ] }, "existingSecretKey": { - "type": "string" + "type": [ + "string", + "null" + ] }, "service": { "type": "object", @@ -467,11 +440,8 @@ }, "required": [ "enabled", - "existingSecret", - "existingSecretKey", "service", "postgresqlUsername", - "postgresqlPassword", "postgresqlDatabase", "persistence" ] @@ -487,10 +457,16 @@ "type": "boolean" }, "existingSecret": { - "type": "string" + "type": [ + "string", + "null" + ] }, "existingSecretKey": { - "type": "string" + "type": [ + "string", + "null" + ] }, "password": { "type": "string" @@ -541,9 +517,6 @@ "required": [ "enabled", "usePassword", - "existingSecret", - "existingSecretKey", - "password", "master", "cluster" ] diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml index a7388eb3916f9..a30323f823aa7 100644 --- a/helm/superset/values.yaml +++ b/helm/superset/values.yaml @@ -357,7 +357,7 @@ postgresql: enabled: true ## ## The name of an existing secret that contains the postgres password. - existingSecret: secret-name + existingSecret: ## Name of the key containing the secret. existingSecretKey: postgresql-password ## @@ -402,7 +402,7 @@ redis: usePassword: false ## ## The name of an existing secret that contains the redis password. - existingSecret: secret-name + existingSecret: ## Name of the key containing the secret. existingSecretKey: redis-password ##