osc-open-webui

by joaquinito2051

Helm chartv0.13.1App 0.1.0

OSC Open Web UI deployment

About this chart

osc-open-webui

OSC Open Web UI deployment

Maintainers

NameEmailUrl
treydock

Requirements

RepositoryNameVersion
https://osc.github.io/osc-helm-charts/osc-common0.15.1
https://osc.github.io/osc-helm-chartsdatabase0.21.1
oci://docker-registry.osc.edu/kubernetes/open-webuiopen-webui17.1.0-osc-r1

Usage

Define necessary values:

global:
  oscServiceAccount: testuser
  imagePullSecret:
    password: SECRET
  ingress:
    host: testuser.k8.osc.edu
    hostAlias: testuser.osc.edu
  auth:
    allowGroups:
      - group
  alert:
    receiver:
  maintenanceGroups:
    - group
  webui_secret_key: SECRET

open-webui:
  sso:
    enableRoleManagement: true
  ollama:
    ollama:
      gpu:
        nvidiaResource: nvidia.com/mig-7g.40gb
    deployment:
      labels:
        osc.edu/service-account: testuser
    podLabels:
      osc.edu/service-account: testuser
    extraEnvVars:
      - name: CONFIG_ITEM
        value: "False"
    volumes:
      - name: data
        hostPath:
          path: /fs/ess/PROJECT
          type: Directory
      - name: home
        hostPath:
          path: /users/PROJECT/USER
          type: Directory

To add PostgreSQL and Redis to the base settings:

global:
  fileset: <storage fileset>
  database:
    enable: true
  postgresql:
    auth:
      postgresPassword: <postgres user password>
      password: <openwebui user password>
  redis:
    password: <redis password>
database:
  redis:
    master:
      persistence:
        annotations:
          osc.edu/fileset: <must match global.fileset>
open-webui:
  websocket:
    enabled: true

Below is an example of PAAS usage:

---
global:
  oscServiceAccount: <USERNAME>
  imagePullSecret:
    create: false
  ingress:
    host: <USERNAME>.k8.osc.edu
    annotations:
      # Limit to OH-TECH VPN
      nginx.ingress.kubernetes.io/whitelist-source-range: '<OH-TECH VPN>'
  auth:
    allowGroups:
      - oscstaff
  # Generate from the command 'uuidgen'
  webui_secret_key: <SECRET>
open-webui:
  persistence:
    storageClass: paas-nfs-client
  sso:
    enableRoleManagement: true
  ollama:
    ollama:
      models:
        pull:
          - <model to pull>
        run:
          - <model to pull>
    nodeSelector:
      # Set MIG
      # One of
      # - NVIDIA-A100-PCIE-40GB-MIG-1g.5gb
      # - NVIDIA-A100-PCIE-40GB-MIG-3g.20gb
      # - NVIDIA-A100-PCIE-40GB-MIG-7g.40gb
      nvidia.com/gpu.product: <MIG>
    volumes:
      - name: data
        hostPath:
          path: /fs/scratch/<Primary group>/<Username>
          type: Directory
      - name: home
        hostPath:
          path: /users/<Primary group>/<Username>
          type: Directory

Values

KeyDescriptionDefault
global.oscServiceAccountThe service account used by OSC deployments. Also pulled from global.env..serviceAccount""
global.environmentThe deployment's OSC environment"production"
global.nodeSelectorRoleThe nodeSelector role"webservices"
global.imagePullSecret.createCreate the image pull secrettrue
global.imagePullSecret.nameimage pull secret name"osc-registry"
global.imagePullSecret.registryOSC registry address"docker-registry.osc.edu"
global.imagePullSecret.passwordThe image pull secret password for database imagesrequired
global.networkPolicy.createCreate the network policyfalse
global.networkPolicy.podSelectorLabels for NetworkPolicy podSelector. Defaults to "osc.common.selectorLabels"nil
global.networkPolicy.ingressAllowedPodsLabels of pods allowed to Ingress from the same namespace[]
global.debugGroupsGroups that debug pods[]
global.maintenanceGroupsGroups that can perform maintenance operations[]
global.portforwardGroupsGroups that are allowed to perform port forwarding[]
global.webservicesDeploy.createCreate webservices deployment rolebindingtrue
global.ingress.hostIngress hostrequired
global.ingress.hostAliasIngress host aliasrequired
global.ingress.additionalHostsIngress additional hosts[]
global.ingress.annotationsAdditional Ingress annotations for the Ingress resourcenil
global.auth.redirectUrisAdditional redirect URIs[]
global.auth.allowGroupsRestrict access to these groups[]
global.alert.receiverThe alert receivernil
global.webui_secret_keyThe Open WebUI secret keyrequired
global.storageClassStorage class for persistence"webservices-nfs-client"
global.filesetThe storage filesetnil
global.otel.image.tagThe otel collector tag, must be replicated to OSC"0.161.0"
global.database.enableEnable database supportfalse
global.database.pool.sizeOpen WebUI database pool size25
global.database.pool.maxOverflowOpen WebUI database pool max overflow20
global.postgresql.auth.postgresPasswordpostgres passwordnil
global.postgresql.auth.passwordopenwebui user passwordnil
global.postgresql.maxConnectionsMax PostgreSQL connections200
global.redis.passwordRedis passwordnil
global.redis.maxclientsRedis max clients10000
global.redis.timeoutRedis client timeout1800
scaling.enabledEnable auto scaling Requires enabling databasefalse
scaling.maxReplicasMax number of replicasBased on database connection pools and max database connections
scaling.prometheusURLPrometheus URL"http://prometheus-prometheus.prometheus.svc:9090"
scaling.scaleDown.stabilizationWindowSecondsHPA scale down stabilizationWindowSeconds600
scaling.scaleUp.stabilizationWindowSecondsHPA scale up stabilizationWindowSeconds0
scaling.triggersScaling triggers[]
podMonitor.relabelingsAdditional relabelings[]
podMonitor.metricRelabelingsAdditional metric relabelings[]
ollama.networkPolicy.allowedPodLabelsArray of additional pod labels to allow[]
database.redis.master.persistence.annotations."osc.edu/fileset"Fileset for Redis storage"PZS0645"
open-webui.websocket.enabledEnable web sockets. required when using databasesfalse
open-webui.image.repositoryOSC registry location for Open WebUI image"docker-registry.osc.edu/kubernetes/open-webui/open-webui"
open-webui.image.tagThe Open WebUI image tag. Must be synced to OSC registry"osc-0.12.5-r0-slim-build0"
open-webui.resources.limits.memoryOpen WebUI pod memory limit"4Gi"
open-webui.resources.limits.cpuOpen WebUI pod CPU limit2
open-webui.resources.requests.memoryOpen WebUI pod memory request"2Gi"
open-webui.resources.requests.cpuOpen WebUI pod CPU request1
open-webui.extraEnvVarsAdditional Open WebUI environment variables[]
open-webui.sso.enableRoleManagementEnables role access controls in Open WebUIfalse
open-webui.ollama.image.repository"docker-registry.osc.edu/kubernetes/ollama/ollama"
open-webui.ollama.image.tag"0.16.1"
open-webui.ollama.imagePullSecrets[0].name"osc-registry"
open-webui.ollama.ollama.gpu.enabledtrue
open-webui.ollama.ollama.gpu.type"nvidia"
open-webui.ollama.ollama.gpu.number1
open-webui.ollama.service.annotations."prometheus.io/probe_module""http"
open-webui.ollama.service.annotations."prometheus.io/probe_scheme""http"
open-webui.ollama.deployment.labels{}
open-webui.ollama.podLabels{}
open-webui.ollama.podSecurityContext.runAsNonRoottrue
open-webui.ollama.securityContext.allowPrivilegeEscalationfalse
open-webui.ollama.securityContext.capabilities.drop[0]"ALL"
open-webui.ollama.securityContext.seccompProfile.type"RuntimeDefault"
open-webui.ollama.securityContext.privilegedfalse
open-webui.ollama.resources.limits.memory"16Gi"
open-webui.ollama.resources.limits.cpu8
open-webui.ollama.resources.requests.memory"4Gi"
open-webui.ollama.resources.requests.cpu2
open-webui.ollama.volumes[]
open-webui.ollama.volumeMounts[0].name"data"
open-webui.ollama.volumeMounts[0].mountPath"/data"
open-webui.ollama.volumeMounts[0].subPath"ollama-models"
open-webui.ollama.volumeMounts[1].name"home"
open-webui.ollama.volumeMounts[1].mountPath"/home/ollama"
open-webui.ollama.volumeMounts[1].subPath"ollama-home"
open-webui.ollama.extraEnv[0].name"OLLAMA_MODELS"
open-webui.ollama.extraEnv[0].value"/data"
open-webui.ollama.extraEnv[1].name"HOME"
open-webui.ollama.extraEnv[1].value"/home/ollama"
open-webui.ollama.extraEnv[2].name"OLLAMA_FLASH_ATTENTION"
open-webui.ollama.extraEnv[2].value"1"
oscCommon.enableEnable the osc-common dependencytrue

Deploy osc-open-webui with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has osc-open-webui 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 chartosc-open-webui is pinned at v0.13.1 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