Files
H Shashank Koppar df58400516 [stable/superset] fix init startup script for superset entrypoint. (#22218)
* fix startup for superset

Signed-off-by: Shashank <shashank.koppar1@gmail.com>

* update chart and image version

Signed-off-by: Shashank <shashank.koppar1@gmail.com>

* try with superset db upgrade if it is upgrade of version

Signed-off-by: Shashank <shashank.koppar1@gmail.com>
2020-05-05 09:27:08 -07:00

213 lines
6.1 KiB
YAML

# Default values for superset.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
## Set default image, imageTag, and imagePullPolicy.
image:
repository: "amancevice/superset"
tag: "0.36.0"
pullPolicy: "IfNotPresent"
pullSecrets: []
initFile: |-
if [ "$1" == "development-mode" ]; then
/usr/local/bin/superset-init --username admin --firstname admin --lastname user --email admin@fab.org --password admin
superset run
elif [ "$1" == "production-mode" ]; then
superset db upgrade
superset init
gunicorn \
-w 10 \
-k gevent \
--timeout 300 \
-b 0.0.0.0:8088 \
--limit-request-line 0 \
--limit-request-field_size 0 \
"superset.app:create_app()"
else
echo "You need to specify which mode to start in by setting production-mode"
echo "or development-mode in extraArguments."
exit 1
fi
configFile: |-
#---------------------------------------------------------
# Superset specific config
#---------------------------------------------------------
ROW_LIMIT = 5000
SUPERSET_WORKERS = 2
SUPERSET_WEBSERVER_PORT = 8088
#---------------------------------------------------------
#---------------------------------------------------------
# Flask App Builder configuration
#---------------------------------------------------------
# Your App secret key
SECRET_KEY = '\2\1thisismyscretkey\1\2\e\y\y\h'
# The SQLAlchemy connection string to your database backend
# This connection defines the path to the database that stores your
# superset metadata (slices, connections, tables, dashboards, ...).
# Note that the connection information to connect to the datasources
# you want to explore are managed directly in the web UI
SQLALCHEMY_DATABASE_URI = 'sqlite:////var/lib/superset/superset.db'
# Flask-WTF flag for CSRF
WTF_CSRF_ENABLED = True
# Add endpoints that need to be exempt from CSRF protection
WTF_CSRF_EXEMPT_LIST = []
# Set this API key to enable Mapbox visualizations
MAPBOX_API_KEY = ''
## Extra confiuguration files and their content to be made available next to the config file
extraConfigFiles: {}
## custom_sso_security_manager.py: |-
## from superset.security import SupersetSecurityManager
## ...
## Extra environment variables that will be passed onto deployment pod
##
extraEnv: {}
## Extra arguments that will be passed to init_superset.sh
## For the sample initFile this is development-mode or production-mode
extraArguments:
- production-mode
## The name of a secret in the same kubernetes namespace which contain values to be added to the environment
## This can be useful for secret keys, etc
##
extraEnvFromSecret: ""
## Deployment level annotations
## Useful for passing other third party annotations to interact with eg. kube2iam.
deploymentAnnotations: {}
persistence:
## If true, superset server will create/use a Persistent Volume Claim
## If false, use emptyDir
##
enabled: false
## superset data Persistent Volume access modes
## Must match those of existing PV or dynamic provisioner
## Ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
accessModes:
- ReadWriteOnce
## superset data Persistent Volume size
##
size: 8Gi
## superset server data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass: "-"
## Superset data Persistent Volume existing claim name
## Requires server.persistence.enabled: true
## If defined, PVC must be created manually before volume will be bound
existingClaim: ""
## Expose the superset service to be accessed from outside the cluster (LoadBalancer service).
## or access it from within the cluster (ClusterIP service). Set the service type and the port to serve it.
## ref: http://kubernetes.io/docs/user-guide/services/
##
service:
type: ClusterIP
port: 9000
## service annotations
annotations: {}
# service.beta.kubernetes.io/aws-load-balancer-internal: "true"
# external-dns.alpha.kubernetes.io/hostname: "superset.domain.com"
## loadbalancer source ranges. only used when service.type is "LoadBalancer"
loadBalancerSourceRanges: []
# - 172.31.0.0/16
ingress:
## If true, superset Ingress will be created
##
enabled: false
## superset Ingress annotations
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: 'true'
## superset Ingress hostnames
## Must be provided if Ingress is enabled
##
hosts:
- superset.domain.com
## superset Ingress path
## Optional, allows specifying paths for more flexibility
## E.g. Traefik ingress likes paths
##
path: /
## superset Ingress TLS configuration
## Secrets must be manually created in the namespace
##
tls: []
# - secretName: superset-server-tls
# hosts:
# - superset.domain.com
## Node labels for pod assignment
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
##
nodeSelector: {}
## Tolerations
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#taints-and-tolerations-beta-feature
tolerations: []
## Affinity and anti-affinity
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
affinity: {}
## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
resources: {}
# requests:
# cpu: 50m
# memory: 256Mi
# limits:
# cpu: 500m
# memory: 750Mi
## Configure liveness/readiness params
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
##
livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 80
timeoutSeconds: 5
periodSeconds: 10
failureThreshold: 2
readinessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 30
timeoutSeconds: 5
periodSeconds: 10
failureThreshold: 2