Skip to main content

Overview

The frontend is a Vite/React application served as a Node.js process on port 8080. It is exposed through Gateway API, Ingress, or an OpenShift Route — separate from the backend API hostname. The frontend calls the backend API using VITE_API_BASE_URL, which must be set to the backend’s public URL.

Required Secrets

kubectl create secret generic cobi-frontend-secrets \
  --namespace cobi \
  --from-literal=NODE_ENV="production" \
  --from-literal=VITE_API_BASE_URL="https://api.example.com" \
  --from-literal=VITE_API_SANDBOX_URL="https://api.example.com"
VITE_API_BASE_URL must match the hostname of the backend Gateway route, Ingress, or Route.

Environment Variable Reference

VariableRequiredDescription
VITE_API_BASE_URLYesPublic base URL of the backend API. The frontend constructs all API request URLs from this value
VITE_API_SANDBOX_URLNoBase URL for sandbox API calls. Set to the same value as VITE_API_BASE_URL if only one environment is deployed
HOSTNoServer bind address. Defaults to 0.0.0.0 in the container image — only set if you need to override

Helm Values

frontend:
  enabled: true
  image:
    repository: docker.io/hellocobi/dashboard-frontend
    tag: "0.1.9"
    pullPolicy: IfNotPresent
  replicaCount: 1
  service:
    type: ClusterIP
    port: 8080
  envFrom:
    - secretRef:
        name: cobi-frontend-secrets
  resources:
    requests:
      cpu: 100m
      memory: 256Mi
    limits:
      cpu: 500m
      memory: 512Mi

Notes

VITE_* variables are injected at container start time via a server-side env-injection mechanism in the Cobi image, so Secret changes take effect after a pod restart — no image rebuild is required.