Grafbase API
This reference documents the Kubernetes configuration options for the Grafbase API, which provides a GraphQL interface to the Grafbase platform. The chart provides all the needed services to run the API, including ClickHouse, PostgreSQL, MinIO S3 API, and Zitadel.
Remember that an error in the API service health check occurs when ClickHouse, PostgreSQL, or the S3 bucket is unavailable or incorrectly configured.
Defaults:
image:
# Controls container image pulls
pullPolicy: IfNotPresent
# Container image repository
repository: docker.grafbase.com/proxy/enterprise-platform/ghcr.io/grafbase/api
# Image tag to use
tag: latest
Kubernetes Horizontal Pod Autoscaler
Defaults:
autoscaling:
# Enables autoscaling
enabled: true
# Minimum number of replicas
minReplicas: 1
# Maximum number of replicas
maxReplicas: 2
# Target CPU utilization percentage
targetCPUUtilizationPercentage: 50
Defaults:
ingress:
# Enables ingress
enabled: false
# Ingress class
className: 'nginx'
hosts:
# Hostnames and paths for the ingress
- host: api.local
paths:
- path: /*
pathType: ImplementationSpecific
backend:
serviceName: api
servicePort: 8080
Kubernetes Service Account Docs
Defaults:
serviceAccount:
# Controls service account creation
create: true
# Annotations to add to the service account
annotations: {}
# Service account name. Uses default if not set
name: ''
Defaults:
service:
type: ClusterIP
port: 80
targetPort: 8080
name: http
nodePort: 30080
Configuration values for the cluster configmap.
Defaults:
configmap:
# Enables configmap creation and env var mounting
enabled: true
name: ''
values:
# The port the service will expose
PORT_WEB: 8080
# The port the worker service will expose
PORT_WORKER: 8080
# Logging level configuration
RUST_LOG: info
# Name of the AWS S3 bucket
AWS_S3_BUCKET_NAME: grafbase
# The access key id for the AWS S3 bucket
AWS_ACCESS_KEY_ID: changeme
# The S3 bucket region
AWS_REGION: us-east-1
# The account id for trusted documents
CLOUDFLARE_ACCOUNT_ID_API: changeme
# Connection URL for ClickHouse database
CLICKHOUSE_URL: clickhouse://grafbase-enterprise-platform-clickhouse:9000
# ClickHouse database name
CLICKHOUSE_DB: analytics
# ClickHouse username
CLICKHOUSE_USER: grafbase
# ClickHouse connection timeout in seconds
CLICKHOUSE_TIMEOUT_SECS: 5
# Maximum number of PostgreSQL connections
PG_MAX_CONNECTIONS: 10
# Minimum number of PostgreSQL connections
PG_MIN_CONNECTIONS: 1
# PostgreSQL connection timeout in seconds
PG_CONNECT_TIMEOUT_SECS: 1
# PostgreSQL connection acquisition timeout in seconds
PG_ACQUIRE_TIMEOUT_SECS: 1
# PostgreSQL idle connection timeout in seconds
PG_IDLE_TIMEOUT_SECS: 300
# Maximum lifetime of PostgreSQL connections in seconds
PG_CONNECTION_MAX_LIFETIME_SECS: 3600
# URL for runtime assets storage
RUNTIME_ASSETS_STORAGE: http://grafbase-enterprise-platform-minio:9000
# Enable or disable tracing
ENABLE_TRACING: true
# The base URL to use for links for Slack notifications and invite emails. Should point to the Grafbase dashboard.
FRONTEND_URL: https://app.grafbase.com
# The Slack app ID for Slack notifications
SLACK_GRAFBASE_APP_CLIENT_ID: changeme
# Allowed CORS origins for the API
CORS_ALLOWED_ORIGINS: "https://grafbase.com,https://app.grafbase.com"
Configuration values for the cluster secret.
Defaults:
secrets:
# Enables secret creation and env var mounting
enabled: true
name: ''
values:
# The secret key for symmetric encryption (access tokens)
SYMMETRIC_ENCRYPTION_SECRET: thisisaverysecurekeythatis32byte
# Password for ClickHouse database access
CLICKHOUSE_PASSWORD: grafbase
# PostgreSQL database connection string
PG_CONNECTION_STRING: postgresql://postgres:grafbase@grafbase-enterprise-platform-postgresql:5432/grafbase
# The access key secret for the AWS S3 bucket
AWS_SECRET_ACCESS_KEY: changeme
Configuration values for the API background worker worker.
Defaults:
worker:
replicaCount: 1
port: 8080
resources: {}