# 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.24.0"
  pullPolicy: "IfNotPresent"

initFile: |-
  /usr/local/bin/superset-init --username admin --firstname admin --lastname user --email admin@fab.org --password admin
  superset runserver

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 environment variables that will be passed onto deployment pod
##
extraEnv: {}

## 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: ""

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

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: /
    port: http
  initialDelaySeconds: 80
  timeoutSeconds: 5
  periodSeconds: 10
  failureThreshold: 2
readinessProbe:
  httpGet:
    path: /
    port: http
  initialDelaySeconds: 60
  timeoutSeconds: 5
  periodSeconds: 10
  failureThreshold: 2
