From 1ece966e44013315b29ed896db11c025d3f97beb Mon Sep 17 00:00:00 2001 From: sangarshanan Date: Mon, 21 Feb 2022 11:23:55 +0530 Subject: [PATCH 1/8] Add redis DB to values --- helm/superset/templates/_helpers.tpl | 9 +- helm/superset/templates/secret-env.yaml | 1 + helm/superset/values.schema.json | 603 ++++++++++++++++++++++++ helm/superset/values.yaml | 1 + 4 files changed, 610 insertions(+), 4 deletions(-) create mode 100644 helm/superset/values.schema.json diff --git a/helm/superset/templates/_helpers.tpl b/helm/superset/templates/_helpers.tpl index 593fd0319885d..fb58de86d0b33 100644 --- a/helm/superset/templates/_helpers.tpl +++ b/helm/superset/templates/_helpers.tpl @@ -93,11 +93,11 @@ class CeleryConfig(object): CELERY_IMPORTS = ('superset.sql_lab', ) CELERY_ANNOTATIONS = {'tasks.add': {'rate_limit': '10/s'}} {{- if .Values.supersetNode.connections.redis_password }} - BROKER_URL = f"redis://:{env('REDIS_PASSWORD')}@{env('REDIS_HOST')}:{env('REDIS_PORT')}/0" - CELERY_RESULT_BACKEND = f"redis://:{env('REDIS_PASSWORD')}@{env('REDIS_HOST')}:{env('REDIS_PORT')}/0" + BROKER_URL = f"redis://:{env('REDIS_PASSWORD')}@{env('REDIS_HOST')}:{env('REDIS_PORT')}/{env('REDIS_DB')}" + CELERY_RESULT_BACKEND = f"redis://:{env('REDIS_PASSWORD')}@{env('REDIS_HOST')}:{env('REDIS_PORT')}/{env('REDIS_DB')}" {{- else }} - BROKER_URL = f"redis://{env('REDIS_HOST')}:{env('REDIS_PORT')}/0" - CELERY_RESULT_BACKEND = f"redis://{env('REDIS_HOST')}:{env('REDIS_PORT')}/0" + BROKER_URL = f"redis://{env('REDIS_HOST')}:{env('REDIS_PORT')}/{env('REDIS_DB')}" + CELERY_RESULT_BACKEND = f"redis://{env('REDIS_HOST')}:{env('REDIS_PORT')}/{env('REDIS_DB')}" {{- end }} CELERY_CONFIG = CeleryConfig @@ -107,6 +107,7 @@ RESULTS_BACKEND = RedisCache( password=env('REDIS_PASSWORD'), {{- end }} port=env('REDIS_PORT'), + db=env('REDIS_DB'), key_prefix='superset_results' ) diff --git a/helm/superset/templates/secret-env.yaml b/helm/superset/templates/secret-env.yaml index 0164d96a8c129..07b87c676ad6c 100644 --- a/helm/superset/templates/secret-env.yaml +++ b/helm/superset/templates/secret-env.yaml @@ -31,6 +31,7 @@ stringData: REDIS_PASSWORD: {{ .Values.supersetNode.connections.redis_password | quote }} {{- end }} REDIS_PORT: {{ .Values.supersetNode.connections.redis_port | quote }} + REDIS_DB: {{ .Values.supersetNode.connections.redis_db | quote }} DB_HOST: {{ tpl .Values.supersetNode.connections.db_host . | quote }} DB_PORT: {{ .Values.supersetNode.connections.db_port | quote }} DB_USER: {{ .Values.supersetNode.connections.db_user | quote }} diff --git a/helm/superset/values.schema.json b/helm/superset/values.schema.json new file mode 100644 index 0000000000000..efa395a0200f1 --- /dev/null +++ b/helm/superset/values.schema.json @@ -0,0 +1,603 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "additionalProperties": true, + "properties": { + "replicaCount": { + "type": "integer" + }, + "runAsUser": { + "type": "integer" + }, + "serviceAccount": { + "type": "object", + "additionalProperties": false, + "properties": { + "create": { + "type": "boolean" + } + }, + "required": [ + "create" + ] + }, + "bootstrapScript": { + "type": "string" + }, + "configFromSecret": { + "type": "string" + }, + "envFromSecret": { + "type": "string" + }, + "envFromSecrets": { + "type": "array" + }, + "extraEnv": { + "type": "object" + }, + "extraEnvRaw": { + "type": "array" + }, + "extraSecretEnv": { + "type": "object" + }, + "extraConfigs": { + "type": "object" + }, + "extraSecrets": { + "type": "object" + }, + "extraVolumes": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.apps.v1.PodSpec/properties/volumes" + }, + "extraVolumeMounts": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.apps.v1.PodSpec/properties/volumeMounts" + }, + "configOverrides": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": { + "extend_timeout": { + "type": "string" + }, + "enable_oauth": { + "type": "string" + } + } + }, + "configOverridesFiles": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": { + "extend_timeout": { + "type": "string" + }, + "enable_oauth": { + "type": "string" + } + } + }, + "configMountPath": { + "type": "string" + }, + "extraConfigMountPath": { + "type": "string" + }, + "image": { + "type": "object", + "additionalProperties": false, + "properties": { + "repository": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "pullPolicy": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.Container/properties/imagePullPolicy" + } + }, + "required": [ + "repository", + "tag", + "pullPolicy" + ] + }, + "imagePullSecrets": { + "type": "array" + }, + "initImage": { + "type": "object", + "additionalProperties": false, + "properties": { + "repository": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "pullPolicy": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.Container/properties/imagePullPolicy" + } + }, + "required": [ + "repository", + "tag", + "pullPolicy" + ] + }, + "service": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.ServiceSpec/properties/type" + }, + "port": { + "type": "integer" + }, + "annotations": { + "$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" + }, + "loadBalancerIP": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.ServiceSpec/properties/loadBalancerIP" + } + }, + "required": [ + "type", + "port" + ] + }, + "ingress": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": { + "type": "boolean" + }, + "annotations": { + "$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" + }, + "path": { + "type": "string" + }, + "pathType": { + "type": "string" + }, + "ingressClassName": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.networking.v1.IngressSpec/properties/ingressClassName" + }, + "hosts": { + "type": "array", + "items": { + "type": "string" + } + }, + "tls": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "secretName": { + "type": "string" + }, + "hosts": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "required": [ + "enabled", + "annotations", + "path", + "pathType", + "hosts", + "tls" + ] + }, + "resources": { + "$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": { + "$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", + "additionalProperties": false, + "properties": { + "command": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.Container/properties/command" + }, + "connections": { + "type": "object", + "additionalProperties": false, + "properties": { + "redis_host": { + "type": "string" + }, + "redis_password": { + "type": "string" + }, + "redis_port": { + "type": "string" + }, + "redis_db": { + "type": "string" + }, + "db_host": { + "type": "string" + }, + "db_port": { + "type": "string" + }, + "db_user": { + "type": "string" + }, + "db_pass": { + "type": "string" + }, + "db_name": { + "type": "string" + } + }, + "required": [ + "redis_host", + "redis_port", + "redis_db", + "db_host", + "db_port", + "db_user", + "db_pass", + "db_name" + ] + }, + "env": { + "type": "object" + }, + "forceReload": { + "type": "boolean" + }, + "initContainers": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.PodSpec/properties/initContainers" + }, + "deploymentAnnotations": { + "$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" + }, + "podAnnotations": { + "$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": [ + "command", + "connections", + "env", + "forceReload" + ] + }, + "supersetWorker": { + "type": "object", + "additionalProperties": false, + "properties": { + "command": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.Container/properties/command" + }, + "forceReload": { + "type": "boolean" + }, + "initContainers": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.PodSpec/properties/initContainers" + }, + "deploymentAnnotations": { + "$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" + }, + "podAnnotations": { + "$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": [ + "command", + "forceReload" + ] + }, + "supersetCeleryBeat": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": { + "type": "boolean" + }, + "command": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.Container/properties/command" + }, + "forceReload": { + "type": "boolean" + }, + "initContainers": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.PodSpec/properties/initContainers" + }, + "deploymentAnnotations": { + "$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" + }, + "podAnnotations": { + "$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": [ + "enabled", + "command", + "forceReload" + ] + }, + "init": { + "type": "object", + "additionalProperties": false, + "properties": { + "resources": { + "type": "object" + }, + "command": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.Container/properties/command" + }, + "enabled": { + "type": "boolean" + }, + "loadExamples": { + "type": "boolean" + }, + "createAdmin": { + "type": "boolean" + }, + "adminUser": { + "type": "object", + "additionalProperties": false, + "properties": { + "username": { + "type": "string" + }, + "firstname": { + "type": "string" + }, + "lastname": { + "type": "string" + }, + "email": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": [ + "username", + "firstname", + "lastname", + "email", + "password" + ] + }, + "initContainers": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.PodSpec/properties/initContainers" + }, + "initscript": { + "type": "string" + }, + "podAnnotations": { + "$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": [ + "resources", + "command", + "enabled", + "loadExamples", + "createAdmin", + "adminUser", + "initscript" + ] + }, + "postgresql": { + "type": "object", + "additionalProperties": true, + "properties": { + "enabled": { + "type": "boolean" + }, + "existingSecret": { + "type": [ + "string", + "null" + ] + }, + "existingSecretKey": { + "type": [ + "string", + "null" + ] + }, + "service": { + "type": "object", + "additionalProperties": true, + "properties": { + "port": { + "type": "integer" + } + }, + "required": [ + "port" + ] + }, + "postgresqlUsername": { + "type": "string" + }, + "postgresqlPassword": { + "type": "string" + }, + "postgresqlDatabase": { + "type": "string" + }, + "persistence": { + "type": "object", + "additionalProperties": true, + "properties": { + "enabled": { + "type": "boolean" + }, + "accessModes": { + "type": "array", + "items": [ + { + "type": "string" + } + ] + } + }, + "required": [ + "enabled", + "accessModes" + ] + } + }, + "required": [ + "enabled", + "service", + "postgresqlUsername", + "postgresqlDatabase", + "persistence" + ] + }, + "redis": { + "type": "object", + "additionalProperties": true, + "properties": { + "enabled": { + "type": "boolean" + }, + "architecture": { + "type": "string" + }, + "auth": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "existingSecret": { + "type": "string" + }, + "existingSecretKey": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": [ + "enabled" + ] + }, + "master": { + "type": "object", + "additionalProperties": true, + "properties": { + "persistence": { + "type": "object", + "additionalProperties": true, + "properties": { + "enabled": { + "type": "boolean" + }, + "accessModes": { + "type": "array", + "items": [ + { + "type": "string" + } + ] + } + }, + "required": [ + "enabled", + "accessModes" + ] + } + }, + "required": [ + "persistence" + ] + }, + "cluster": { + "type": "object", + "additionalProperties": true, + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ] + } + }, + "required": [ + "enabled", + "architecture", + "master" + ] + }, + "nodeSelector": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.apps.v1.PodSpec/properties/nodeSelector" + }, + "tolerations": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.apps.v1.PodSpec/properties/tolerations" + }, + "affinity": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json#/definitions/io.k8s.api.core.v1.Affinity" + } + }, + "required": [ + "replicaCount", + "runAsUser", + "serviceAccount", + "bootstrapScript", + "configFromSecret", + "envFromSecret", + "envFromSecrets", + "extraEnv", + "extraEnvRaw", + "extraSecretEnv", + "extraConfigs", + "extraSecrets", + "extraVolumes", + "extraVolumeMounts", + "configOverrides", + "configOverridesFiles", + "configMountPath", + "extraConfigMountPath", + "image", + "imagePullSecrets", + "service", + "ingress", + "resources", + "hostAliases", + "supersetNode", + "supersetWorker", + "supersetCeleryBeat", + "init", + "postgresql", + "redis", + "nodeSelector", + "tolerations", + "affinity" + ] +} diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml index 5acc9805867bf..ac1a5e6f6113e 100644 --- a/helm/superset/values.yaml +++ b/helm/superset/values.yaml @@ -256,6 +256,7 @@ supersetNode: redis_host: '{{ template "superset.fullname" . }}-redis-headless' # redis_password: superset redis_port: "6379" + redis_db: "0" # You need to change below configuration incase bringing own PostgresSQL instance and also set postgresql.enabled:false db_host: '{{ template "superset.fullname" . }}-postgresql' db_port: "5432" From f8270781e00d946e8f023c22246b00e4da34d39a Mon Sep 17 00:00:00 2001 From: sangarshanan Date: Mon, 21 Feb 2022 17:25:55 +0530 Subject: [PATCH 2/8] Add target port --- helm/superset/templates/service.yaml | 4 ++-- helm/superset/values.schema.json | 6 +++++- helm/superset/values.yaml | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/helm/superset/templates/service.yaml b/helm/superset/templates/service.yaml index 6ac950d1da6b2..01f316cb88ef0 100644 --- a/helm/superset/templates/service.yaml +++ b/helm/superset/templates/service.yaml @@ -32,9 +32,9 @@ spec: type: {{ .Values.service.type }} ports: - port: {{ .Values.service.port }} - targetPort: http + targetPort: {{ .Values.service.targetPort }} protocol: TCP - name: http + name: https selector: app: {{ template "superset.name" . }} release: {{ .Release.Name }} diff --git a/helm/superset/values.schema.json b/helm/superset/values.schema.json index efa395a0200f1..0c052741cba60 100644 --- a/helm/superset/values.schema.json +++ b/helm/superset/values.schema.json @@ -431,10 +431,14 @@ "properties": { "port": { "type": "integer" + }, + "targetPort": { + "type": "integer" } }, "required": [ - "port" + "port", + "targetPort" ] }, "postgresqlUsername": { diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml index ac1a5e6f6113e..eb1d8bb3dde1f 100644 --- a/helm/superset/values.yaml +++ b/helm/superset/values.yaml @@ -196,8 +196,8 @@ initImage: service: type: ClusterIP port: 8088 - annotations: - {} + targetPort: 8088 + annotations: {} # cloud.google.com/load-balancer-type: "Internal" loadBalancerIP: null From 19cd6ff7ed2b65c685cab6bb154d508410e053fe Mon Sep 17 00:00:00 2001 From: sangarshanan Date: Mon, 21 Feb 2022 17:38:26 +0530 Subject: [PATCH 3/8] Add servicePort --- helm/superset/templates/service.yaml | 4 ++-- helm/superset/values.schema.json | 9 +++++---- helm/superset/values.yaml | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/helm/superset/templates/service.yaml b/helm/superset/templates/service.yaml index 01f316cb88ef0..c2105420e82f3 100644 --- a/helm/superset/templates/service.yaml +++ b/helm/superset/templates/service.yaml @@ -31,8 +31,8 @@ metadata: spec: type: {{ .Values.service.type }} ports: - - port: {{ .Values.service.port }} - targetPort: {{ .Values.service.targetPort }} + - port: {{ .Values.service.servicePort }} + targetPort: http protocol: TCP name: https selector: diff --git a/helm/superset/values.schema.json b/helm/superset/values.schema.json index 0c052741cba60..315d1300834cc 100644 --- a/helm/superset/values.schema.json +++ b/helm/superset/values.schema.json @@ -141,6 +141,9 @@ "port": { "type": "integer" }, + "servicePort": { + "type": "integer" + }, "annotations": { "$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" }, @@ -150,7 +153,8 @@ }, "required": [ "type", - "port" + "port", + "servicePort" ] }, "ingress": { @@ -431,9 +435,6 @@ "properties": { "port": { "type": "integer" - }, - "targetPort": { - "type": "integer" } }, "required": [ diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml index eb1d8bb3dde1f..e5b59b5941797 100644 --- a/helm/superset/values.yaml +++ b/helm/superset/values.yaml @@ -196,7 +196,7 @@ initImage: service: type: ClusterIP port: 8088 - targetPort: 8088 + servicePort: 8088 annotations: {} # cloud.google.com/load-balancer-type: "Internal" loadBalancerIP: null From e97430346574eb994cb5489113ed96993afc9ff4 Mon Sep 17 00:00:00 2001 From: sangarshanan Date: Mon, 21 Feb 2022 17:41:54 +0530 Subject: [PATCH 4/8] Remove redundant targetPort --- helm/superset/values.schema.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/helm/superset/values.schema.json b/helm/superset/values.schema.json index 315d1300834cc..d8ba8939ba40c 100644 --- a/helm/superset/values.schema.json +++ b/helm/superset/values.schema.json @@ -438,8 +438,7 @@ } }, "required": [ - "port", - "targetPort" + "port" ] }, "postgresqlUsername": { From aeed4fc38282c84b3d61a0bd5a4a79bed895b6d3 Mon Sep 17 00:00:00 2001 From: sangarshanan Date: Tue, 22 Feb 2022 15:58:44 +0530 Subject: [PATCH 5/8] Add nginx and proxy fix --- helm/superset/templates/_helpers.tpl | 2 ++ helm/superset/templates/deployment.yaml | 10 ++++++++++ helm/superset/templates/service.yaml | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/helm/superset/templates/_helpers.tpl b/helm/superset/templates/_helpers.tpl index fb58de86d0b33..847dac6575cc8 100644 --- a/helm/superset/templates/_helpers.tpl +++ b/helm/superset/templates/_helpers.tpl @@ -79,6 +79,8 @@ CACHE_CONFIG = { } DATA_CACHE_CONFIG = CACHE_CONFIG +ENABLE_PROXY_FIX = True +PROXY_FIX_CONFIG = {"x_for": 1, "x_proto": 1, "x_host": 1, "x_port": 0, "x_prefix": 1} SQLALCHEMY_DATABASE_URI = f"postgresql+psycopg2://{env('DB_USER')}:{env('DB_PASS')}@{env('DB_HOST')}:{env('DB_PORT')}/{env('DB_NAME')}" SQLALCHEMY_TRACK_MODIFICATIONS = True SECRET_KEY = env('SECRET_KEY', 'thisISaSECRET_1234') diff --git a/helm/superset/templates/deployment.yaml b/helm/superset/templates/deployment.yaml index d668cb7a0b358..535c0cff6bc04 100644 --- a/helm/superset/templates/deployment.yaml +++ b/helm/superset/templates/deployment.yaml @@ -81,6 +81,16 @@ spec: hostAliases: {{- toYaml . | nindent 6 }} {{- end }} containers: + - name: nginx + image: nginx + imagePullPolicy: IfNotPresent + ports: + - name: nginx + containerPort: 80 + volumeMounts: + - name: superset-extra-config + mountPath: /etc/nginx/conf.d/default.conf + subPath: nginx.conf - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} diff --git a/helm/superset/templates/service.yaml b/helm/superset/templates/service.yaml index c2105420e82f3..adaf902faae87 100644 --- a/helm/superset/templates/service.yaml +++ b/helm/superset/templates/service.yaml @@ -32,7 +32,7 @@ spec: type: {{ .Values.service.type }} ports: - port: {{ .Values.service.servicePort }} - targetPort: http + targetPort: 80 protocol: TCP name: https selector: From f58140bca6579e213db3c9d1e88729da32f7a64b Mon Sep 17 00:00:00 2001 From: Abhinesh Hada Date: Fri, 22 Jul 2022 14:31:43 +0530 Subject: [PATCH 6/8] upgrade postgres bitnami chart version --- helm/superset/Chart.yaml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml index 7394d150cafbd..c72423cb6447c 100644 --- a/helm/superset/Chart.yaml +++ b/helm/superset/Chart.yaml @@ -30,12 +30,3 @@ maintainers: email: craig@craigrueda.com url: https://github.com/craig-rueda version: 0.7.7 -dependencies: - - name: postgresql - version: 11.1.22 - repository: https://charts.bitnami.com/bitnami - condition: postgresql.enabled - - name: redis - version: 16.3.1 - repository: https://charts.bitnami.com/bitnami - condition: redis.enabled From 48436bdbf675b6997493ab75767057b8d1264d27 Mon Sep 17 00:00:00 2001 From: sangarshanan Date: Fri, 2 Dec 2022 18:15:56 +0530 Subject: [PATCH 7/8] remove chart lock --- helm/superset/Chart.lock | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 helm/superset/Chart.lock diff --git a/helm/superset/Chart.lock b/helm/superset/Chart.lock deleted file mode 100644 index 6ae53c9f8db88..0000000000000 --- a/helm/superset/Chart.lock +++ /dev/null @@ -1,9 +0,0 @@ -dependencies: -- name: postgresql - repository: https://charts.bitnami.com/bitnami - version: 11.1.22 -- name: redis - repository: https://charts.bitnami.com/bitnami - version: 16.3.1 -digest: sha256:f80cc4ec2bb6f327d348bc15e9192cc6ab2163781c1e35f85720565a36a1cb14 -generated: "2022-10-13T16:59:44.305764+02:00" From 976afba413b5107d796a77e91bb3491485ccfcf4 Mon Sep 17 00:00:00 2001 From: sangarshanan Date: Fri, 2 Dec 2022 18:22:13 +0530 Subject: [PATCH 8/8] remove value schema --- helm/superset/values.schema.json | 607 ------------------------------- 1 file changed, 607 deletions(-) delete mode 100644 helm/superset/values.schema.json diff --git a/helm/superset/values.schema.json b/helm/superset/values.schema.json deleted file mode 100644 index d8ba8939ba40c..0000000000000 --- a/helm/superset/values.schema.json +++ /dev/null @@ -1,607 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "additionalProperties": true, - "properties": { - "replicaCount": { - "type": "integer" - }, - "runAsUser": { - "type": "integer" - }, - "serviceAccount": { - "type": "object", - "additionalProperties": false, - "properties": { - "create": { - "type": "boolean" - } - }, - "required": [ - "create" - ] - }, - "bootstrapScript": { - "type": "string" - }, - "configFromSecret": { - "type": "string" - }, - "envFromSecret": { - "type": "string" - }, - "envFromSecrets": { - "type": "array" - }, - "extraEnv": { - "type": "object" - }, - "extraEnvRaw": { - "type": "array" - }, - "extraSecretEnv": { - "type": "object" - }, - "extraConfigs": { - "type": "object" - }, - "extraSecrets": { - "type": "object" - }, - "extraVolumes": { - "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.apps.v1.PodSpec/properties/volumes" - }, - "extraVolumeMounts": { - "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.apps.v1.PodSpec/properties/volumeMounts" - }, - "configOverrides": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "properties": { - "extend_timeout": { - "type": "string" - }, - "enable_oauth": { - "type": "string" - } - } - }, - "configOverridesFiles": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "properties": { - "extend_timeout": { - "type": "string" - }, - "enable_oauth": { - "type": "string" - } - } - }, - "configMountPath": { - "type": "string" - }, - "extraConfigMountPath": { - "type": "string" - }, - "image": { - "type": "object", - "additionalProperties": false, - "properties": { - "repository": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "pullPolicy": { - "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.Container/properties/imagePullPolicy" - } - }, - "required": [ - "repository", - "tag", - "pullPolicy" - ] - }, - "imagePullSecrets": { - "type": "array" - }, - "initImage": { - "type": "object", - "additionalProperties": false, - "properties": { - "repository": { - "type": "string" - }, - "tag": { - "type": "string" - }, - "pullPolicy": { - "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.Container/properties/imagePullPolicy" - } - }, - "required": [ - "repository", - "tag", - "pullPolicy" - ] - }, - "service": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.ServiceSpec/properties/type" - }, - "port": { - "type": "integer" - }, - "servicePort": { - "type": "integer" - }, - "annotations": { - "$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" - }, - "loadBalancerIP": { - "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.ServiceSpec/properties/loadBalancerIP" - } - }, - "required": [ - "type", - "port", - "servicePort" - ] - }, - "ingress": { - "type": "object", - "additionalProperties": false, - "properties": { - "enabled": { - "type": "boolean" - }, - "annotations": { - "$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" - }, - "path": { - "type": "string" - }, - "pathType": { - "type": "string" - }, - "ingressClassName": { - "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.networking.v1.IngressSpec/properties/ingressClassName" - }, - "hosts": { - "type": "array", - "items": { - "type": "string" - } - }, - "tls": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "secretName": { - "type": "string" - }, - "hosts": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - }, - "required": [ - "enabled", - "annotations", - "path", - "pathType", - "hosts", - "tls" - ] - }, - "resources": { - "$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": { - "$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", - "additionalProperties": false, - "properties": { - "command": { - "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.Container/properties/command" - }, - "connections": { - "type": "object", - "additionalProperties": false, - "properties": { - "redis_host": { - "type": "string" - }, - "redis_password": { - "type": "string" - }, - "redis_port": { - "type": "string" - }, - "redis_db": { - "type": "string" - }, - "db_host": { - "type": "string" - }, - "db_port": { - "type": "string" - }, - "db_user": { - "type": "string" - }, - "db_pass": { - "type": "string" - }, - "db_name": { - "type": "string" - } - }, - "required": [ - "redis_host", - "redis_port", - "redis_db", - "db_host", - "db_port", - "db_user", - "db_pass", - "db_name" - ] - }, - "env": { - "type": "object" - }, - "forceReload": { - "type": "boolean" - }, - "initContainers": { - "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.PodSpec/properties/initContainers" - }, - "deploymentAnnotations": { - "$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" - }, - "podAnnotations": { - "$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": [ - "command", - "connections", - "env", - "forceReload" - ] - }, - "supersetWorker": { - "type": "object", - "additionalProperties": false, - "properties": { - "command": { - "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.Container/properties/command" - }, - "forceReload": { - "type": "boolean" - }, - "initContainers": { - "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.PodSpec/properties/initContainers" - }, - "deploymentAnnotations": { - "$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" - }, - "podAnnotations": { - "$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": [ - "command", - "forceReload" - ] - }, - "supersetCeleryBeat": { - "type": "object", - "additionalProperties": false, - "properties": { - "enabled": { - "type": "boolean" - }, - "command": { - "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.Container/properties/command" - }, - "forceReload": { - "type": "boolean" - }, - "initContainers": { - "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.PodSpec/properties/initContainers" - }, - "deploymentAnnotations": { - "$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" - }, - "podAnnotations": { - "$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": [ - "enabled", - "command", - "forceReload" - ] - }, - "init": { - "type": "object", - "additionalProperties": false, - "properties": { - "resources": { - "type": "object" - }, - "command": { - "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.Container/properties/command" - }, - "enabled": { - "type": "boolean" - }, - "loadExamples": { - "type": "boolean" - }, - "createAdmin": { - "type": "boolean" - }, - "adminUser": { - "type": "object", - "additionalProperties": false, - "properties": { - "username": { - "type": "string" - }, - "firstname": { - "type": "string" - }, - "lastname": { - "type": "string" - }, - "email": { - "type": "string" - }, - "password": { - "type": "string" - } - }, - "required": [ - "username", - "firstname", - "lastname", - "email", - "password" - ] - }, - "initContainers": { - "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.PodSpec/properties/initContainers" - }, - "initscript": { - "type": "string" - }, - "podAnnotations": { - "$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": [ - "resources", - "command", - "enabled", - "loadExamples", - "createAdmin", - "adminUser", - "initscript" - ] - }, - "postgresql": { - "type": "object", - "additionalProperties": true, - "properties": { - "enabled": { - "type": "boolean" - }, - "existingSecret": { - "type": [ - "string", - "null" - ] - }, - "existingSecretKey": { - "type": [ - "string", - "null" - ] - }, - "service": { - "type": "object", - "additionalProperties": true, - "properties": { - "port": { - "type": "integer" - } - }, - "required": [ - "port" - ] - }, - "postgresqlUsername": { - "type": "string" - }, - "postgresqlPassword": { - "type": "string" - }, - "postgresqlDatabase": { - "type": "string" - }, - "persistence": { - "type": "object", - "additionalProperties": true, - "properties": { - "enabled": { - "type": "boolean" - }, - "accessModes": { - "type": "array", - "items": [ - { - "type": "string" - } - ] - } - }, - "required": [ - "enabled", - "accessModes" - ] - } - }, - "required": [ - "enabled", - "service", - "postgresqlUsername", - "postgresqlDatabase", - "persistence" - ] - }, - "redis": { - "type": "object", - "additionalProperties": true, - "properties": { - "enabled": { - "type": "boolean" - }, - "architecture": { - "type": "string" - }, - "auth": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "existingSecret": { - "type": "string" - }, - "existingSecretKey": { - "type": "string" - }, - "password": { - "type": "string" - } - }, - "required": [ - "enabled" - ] - }, - "master": { - "type": "object", - "additionalProperties": true, - "properties": { - "persistence": { - "type": "object", - "additionalProperties": true, - "properties": { - "enabled": { - "type": "boolean" - }, - "accessModes": { - "type": "array", - "items": [ - { - "type": "string" - } - ] - } - }, - "required": [ - "enabled", - "accessModes" - ] - } - }, - "required": [ - "persistence" - ] - }, - "cluster": { - "type": "object", - "additionalProperties": true, - "properties": { - "enabled": { - "type": "boolean" - } - }, - "required": [ - "enabled" - ] - } - }, - "required": [ - "enabled", - "architecture", - "master" - ] - }, - "nodeSelector": { - "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.apps.v1.PodSpec/properties/nodeSelector" - }, - "tolerations": { - "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.apps.v1.PodSpec/properties/tolerations" - }, - "affinity": { - "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json#/definitions/io.k8s.api.core.v1.Affinity" - } - }, - "required": [ - "replicaCount", - "runAsUser", - "serviceAccount", - "bootstrapScript", - "configFromSecret", - "envFromSecret", - "envFromSecrets", - "extraEnv", - "extraEnvRaw", - "extraSecretEnv", - "extraConfigs", - "extraSecrets", - "extraVolumes", - "extraVolumeMounts", - "configOverrides", - "configOverridesFiles", - "configMountPath", - "extraConfigMountPath", - "image", - "imagePullSecrets", - "service", - "ingress", - "resources", - "hostAliases", - "supersetNode", - "supersetWorker", - "supersetCeleryBeat", - "init", - "postgresql", - "redis", - "nodeSelector", - "tolerations", - "affinity" - ] -}