ilum-streamlit

by Ilum

Helm chartv0.1.0Verified publisher

Chart for integrating Streamlit with Ilum. It is meant to be used within the main Ilum chart.

About this chart

Streamlit Helm Chart

Introduction

This Helm chart is a part of Ilum - a modular Data Lakehouse for a Cloud Native World. It provides the Streamlit module.

Parameters

Global parameters

NameDescriptionValue
fullnameOverrideString to fully override common.names.fullname""
nameOverrideString to partially override common.names.name""

Common parameters

NameDescriptionValue
modeMode of operation for the Streamlit application (currently supported: "image")image
replicaCountNumber of Streamlit replicas to deploy1

Image parameters

NameDescriptionValue
image.repositoryStreamlit image repositoryilum/streamlit-example
image.pullPolicyStreamlit image pull policyIfNotPresent
image.tagStreamlit image tag (immutable tags are recommended). Overrides the Chart appVersion1.0.0

Service parameters

NameDescriptionValue
service.typeStreamlit service typeClusterIP
service.portStreamlit service port8501
service.targetPortStreamlit target port (container port)8501
service.annotationsAdditional annotations for the Streamlit service{}

Resource parameters

NameDescriptionValue
resourcesThe resources limits and requests for the Streamlit containers{}

Deployment parameters

NameDescriptionValue
nodeSelectorNode labels for pod assignment{}
tolerationsTolerations for pod assignment[]
affinityAffinity for pod assignment{}
podAnnotationsAnnotations for Streamlit pods{}
podLabelsExtra labels for Streamlit pods{}
podSecurityContextSecurity context for the Streamlit pod(s){}
securityContextSecurity context for the Streamlit container(s){}

Probe parameters

NameDescriptionValue
livenessProbe.enabledEnable livenessProbe on Streamlit containerstrue
livenessProbe.httpGet.pathPath for livenessProbe/_stcore/health
livenessProbe.httpGet.portPort for livenessProbestreamlit
livenessProbe.initialDelaySecondsInitial delay seconds for livenessProbe30
livenessProbe.periodSecondsPeriod seconds for livenessProbe10
livenessProbe.timeoutSecondsTimeout seconds for livenessProbe5
livenessProbe.successThresholdSuccess threshold for livenessProbe1
livenessProbe.failureThresholdFailure threshold for livenessProbe3
readinessProbe.enabledEnable readinessProbe on Streamlit containerstrue
readinessProbe.httpGet.pathPath for readinessProbe/_stcore/health
readinessProbe.httpGet.portPort for readinessProbestreamlit
readinessProbe.initialDelaySecondsInitial delay seconds for readinessProbe10
readinessProbe.periodSecondsPeriod seconds for readinessProbe5
readinessProbe.timeoutSecondsTimeout seconds for readinessProbe3
readinessProbe.successThresholdSuccess threshold for readinessProbe1
readinessProbe.failureThresholdFailure threshold for readinessProbe3

Environment variables

NameDescriptionValue
envArray with environment variables to add to Streamlit containers[]
envFromArray with environment variables from ConfigMaps or Secrets[]

Volume parameters

NameDescriptionValue
volumesOptionally specify extra list of additional volumes for the Streamlit pod(s)[]
volumeMountsOptionally specify extra list of additional volumeMounts for the Streamlit container(s)[]

Streamlit configuration

NameDescriptionValue
streamlit.server.portStreamlit server port8501
streamlit.server.headlessEnable headless modetrue
streamlit.server.enableCORSEnable CORSfalse
streamlit.server.enableXsrfProtectionEnable XSRF protectiontrue
streamlit.browser.gatherUsageStatsGather usage statisticsfalse

Additional containers

NameDescriptionValue
initContainersAdd additional init containers to the Streamlit pod(s)[]
sidecarsAdd additional sidecar containers to the Streamlit pod(s)[]

Configuration and installation details

Setting up environment variables

You can set environment variables using the env parameter:

env:
  - name: STREAMLIT_SERVER_PORT
    value: "8501"

Using ConfigMaps and Secrets

You can inject environment variables from ConfigMaps or Secrets:

envFrom:
  - configMapRef:
      name: streamlit-config
  - secretRef:
      name: streamlit-secrets

Deploy ilum-streamlit with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ilum-streamlit on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartilum-streamlit is pinned at v0.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply