saleor
by upstreamyard
Saleor, the headless GraphQL commerce platform (API, Celery worker and beat, dashboard). Community chart by upstreamyard, not an official Saleor chart.
About this chart
Saleor Helm chart
Have any questions, feedback or need help (e.g. setup, hardened images, etc.)? Reach out to [email protected]
Helm chart for Saleor, the headless GraphQL commerce platform. It runs the GraphQL API, the Celery worker and beat for background tasks, and the Saleor dashboard, using Saleor's official images ghcr.io/saleor/saleor and ghcr.io/saleor/saleor-dashboard.
Community chart by upstreamyard, not an official Saleor chart. Saleor is © Saleor Commerce, licensed under BSD-3-Clause.
Install
Saleor needs PostgreSQL, a Celery broker (e.g. Redis) and two S3 buckets (see Requirements). Create the keys once and keep them; the RSA key signs login tokens, so a new key logs everyone out:
kubectl create secret generic saleor-keys \
--from-literal=secret-key="$(openssl rand -hex 32)" \
--from-literal=rsa-private-key="$(openssl genrsa 2048)"
helm repo add upstreamyard https://upstreamyard.github.io/helm-charts
helm install saleor upstreamyard/saleor \
--set saleor.publicUrl=https://api.example.com/ \
--set 'saleor.allowedClientHosts={shop.example.com,dashboard.example.com}' \
--set saleor.existingSecret=saleor-keys \
--set database.url='postgres://saleor:...@your-postgres:5432/saleor' \
--set celery.brokerUrl=redis://your-redis:6379/1 \
--set cache.url=redis://your-redis:6379/0 \
--set storage.s3.mediaBucket=your-media-bucket \
--set storage.s3.privateBucket=your-private-bucket \
--set storage.s3.region=eu-central-1 \
--set [email protected] --set admin.password='...'
Or from the OCI registry:
helm install saleor oci://ghcr.io/upstreamyard/charts/saleor --set saleor.publicUrl=https://api.example.com/ ...
The API answers on /graphql/, the dashboard on /dashboard/ of its own Service (or dashboard.ingress). Without admin.*, create the first admin account with kubectl exec -it deploy/saleor -- python3 manage.py createsuperuser.
Verifying the chart
Chart packages are PGP-signed. Import the public key (fingerprint 9B416F989B7E6C65F7F3BFAE7689688B20EC7813) and install with --verify:
curl -s https://upstreamyard.github.io/helm-charts/pgp_keys.asc | gpg --dearmor > upstreamyard.gpg
helm install saleor upstreamyard/saleor --verify --keyring upstreamyard.gpg --set ...
The OCI copy on GHCR is signed with cosign instead (see the repository README).
Requirements
- PostgreSQL (required). Saleor 3.23.41 was tested with PostgreSQL 17 and 18; Saleor's own CI uses 15. The database user must be allowed to create tables and indexes (migrations).
- A Celery broker (required): Redis, RabbitMQ or Amazon SQS. Webhooks, search indexing, emails and data migrations run as background tasks.
- Redis as a cache (recommended with more than one pod), in a different Redis database than the broker.
- Object storage (required): two S3 buckets, or Google Cloud Storage or Azure. The media bucket (product images, thumbnails) must be readable by browsers; the private bucket (webhook payloads, exports) must not be public. Saleor doesn't serve files from local disk in production, and the API writes files the worker reads, so a local volume doesn't work.
This chart does not deploy a database, Redis or object storage.
What the chart does
-
Production mode: runs Saleor with
DEBUG=False.ALLOWED_HOSTSis the host ofsaleor.publicUrlplus the Service's cluster DNS names, so other pods can callhttp://<release>-saleor:8000/graphql/. -
Migrations: a Job runs
manage.py migratebefore every install and upgrade (Helm hook), then creates the admin account fromadmin.*if it doesn't exist yet. Saleor's pods don't migrate on startup. -
Data migrations on upgrades:
migratealso queues Celery tasks that migrate data. Celery discards tasks it doesn't know, so the old version's workers, which still run while the Job runs, would drop the new version's tasks. Without the steps below, a 3.22 → 3.23 upgrade lost 7 of these tasks. The chart therefore:- sends them to a queue named after the new version, which only the new workers consume;
- replaces the workers with
Recreate.
Tested: no task was lost on a 3.22.73 → 3.23.41 upgrade.
-
Background tasks: a Celery worker Deployment (
worker.*) and exactly one Celery beat with Saleor's database scheduler (beat.*,Recreate). The worker's liveness probe pings it over the broker and restarts a hung worker after 3 failed checks. -
Dashboard: the official dashboard image, configured with
API_URL(defaults tosaleor.publicUrl+graphql/). The chart runs its nginx as non-root on port 8080 with its own config, serving/dashboard/. -
Probes and shutdown:
/health/for startup, liveness and readiness. On rollouts, a 10 spreStopsleep keeps a stopping API pod serving until it has left the Service, then the server finishes requests in flight (up to 30 s). Tested: 0 failed requests out of 1546 during a rollout, compared with 5 out of 1030 without the sleep. -
Security: runs as non-root (the image's
saleoruser, UID 999; nginx UID 101), read-only root filesystem, drops all capabilities, no ServiceAccount token. Secrets come from a Secret created by the chart or from your own (existingSecretfor every credential). -
helm testchecks/health/, runs a GraphQL query (needs the database) through the Service, and checks that the dashboard serves the configured API URL.
Configuration
Every Saleor setting is an environment variable; set them with extraEnv (plain values) or extraEnvFrom (Secrets). See Saleor's list of environment variables. Shop settings (channels, taxes, shipping, payment and email plugins) live in the database and are changed in the dashboard.
- Apps and webhooks inside the cluster: Saleor refuses to call private IP addresses (protection against server-side request forgery), so webhooks to apps in the same cluster fail with
Invalid IP address. SetHTTP_IP_FILTER_ENABLED=FalsewithextraEnvif you run Saleor apps in the cluster. - Calling the API over http from inside the cluster: when
saleor.publicUrlishttps, Saleor redirects plain-http requests to https (301). In-cluster clients such as a storefront doing server-side rendering must sendX-Forwarded-Proto: https. The Ingress controller sends it for outside traffic. - Email: Saleor sends emails through its email plugins (configured in the dashboard) or through apps;
USER_EMAIL_URLcan provide the SMTP settings for the user emails plugin. - Google Cloud Storage or Azure: set
storage.type=customand theGS_*orAZURE_*variables (media and private bucket or container) withextraEnv/extraEnvFrom. Not tested by us; S3 was tested with an S3-compatible store (SeaweedFS). - Credentials for S3 from a cloud identity (e.g. EKS IAM roles for service accounts): leave
storage.s3.accessKeyIdandexistingSecretempty and annotate the ServiceAccount (serviceAccount.annotations); boto3 then uses its default credential chain. Not tested by us. - Separate task queues: if you route tasks to other queues with Saleor's
*_QUEUE_NAMEsettings, add them toworker.queues.
Production example
# values-prod.yaml
replicaCount: 2
saleor:
publicUrl: https://api.shop.example.com/
allowedClientHosts: [shop.example.com, dashboard.shop.example.com]
allowedGraphqlOrigins: [https://shop.example.com, https://dashboard.shop.example.com]
existingSecret: saleor-keys # keys: secret-key, rsa-private-key
database:
existingSecret: saleor-db # key: database-url
celery:
existingSecret: saleor-redis # key: broker-url
cache:
existingSecret: saleor-redis # key: cache-url
storage:
s3:
mediaBucket: shop-media
privateBucket: shop-private
region: eu-central-1
customDomain: media.shop.example.com # CDN in front of the media bucket
serviceAccount:
annotations:
eks.amazonaws.com/role-arn: arn:aws:iam::123456789012:role/saleor-s3
worker:
replicaCount: 2
ingress:
enabled: true
className: nginx
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 20m
hosts:
- host: api.shop.example.com
paths: [{ path: /, pathType: Prefix }]
tls:
- hosts: [api.shop.example.com]
secretName: api-tls
dashboard:
ingress:
enabled: true
className: nginx
hosts:
- host: dashboard.shop.example.com
paths: [{ path: /, pathType: Prefix }]
tls:
- hosts: [dashboard.shop.example.com]
secretName: dashboard-tls
Known issues
- A fresh install of Saleor 3.22.73 fails on PostgreSQL 18 (migration
discount.0052_drop_sales_constraints:column "id" is in a primary key). 3.23.41 installs fine on PostgreSQL 18. - The dashboard image is released separately from the API. The chart pins a dashboard version with the same minor version as the API; override
dashboard.image.tagto change it.
Values
| Key | Type | Default | Description |
|---|---|---|---|
| admin.email | string | "" | Email of the first admin account. Leave empty to create it yourself (see the README). |
| admin.existingSecret | string | "" | Name of an existing Secret that holds the admin password. |
| admin.existingSecretKey | string | "admin-password" | Key in existingSecret that holds the admin password. |
| admin.password | string | "" | Password of the first admin account. Stored in a Secret created by this chart. Ignored when existingSecret is set. |
| affinity | object | {} | Affinity. |
| beat.enabled | bool | true | Run Celery beat, the scheduler for periodic tasks (expiring checkouts and orders, search index updates, cleanup). Exactly one runs. |
| beat.resources | object | {"limits":{"memory":"384Mi"},"requests":{"cpu":"20m","memory":"192Mi"}} | Resources for the beat container. |
| cache.existingSecret | string | "" | Name of an existing Secret that holds the cache URL. |
| cache.existingSecretKey | string | "cache-url" | Key in existingSecret that holds the cache URL. |
| cache.url | string | "" | Cache URL (CACHE_URL), e.g. redis://redis:6379/0. Use a different Redis database than the broker. Stored in a Secret created by this chart. Ignored when existingSecret is set. |
| celery.brokerUrl | string | "" | Broker URL (CELERY_BROKER_URL), e.g. redis://redis:6379/1. Redis, RabbitMQ (amqp://) and SQS (sqs://) work. Stored in a Secret created by this chart. Ignored when existingSecret is set. |
| celery.existingSecret | string | "" | Name of an existing Secret that holds the broker URL. |
| celery.existingSecretKey | string | "broker-url" | Key in existingSecret that holds the broker URL. |
| dashboard.apiUrl | string | "" | GraphQL URL the dashboard calls from the browser (API_URL). Defaults to saleor.publicUrl + graphql/. |
| dashboard.enabled | bool | true | Deploy the Saleor dashboard (the admin UI, a static web app). |
| dashboard.image.pullPolicy | string | "IfNotPresent" | Image pull policy. |
| dashboard.image.repository | string | "ghcr.io/saleor/saleor-dashboard" | Dashboard image repository. |
| dashboard.image.tag | string | "3.23.46" | Dashboard image tag. Released separately from the API; keep its minor version equal to the API's. |
| dashboard.ingress.annotations | object | {} | Ingress annotations. |
| dashboard.ingress.className | string | "" | Ingress class name. |
| dashboard.ingress.enabled | bool | false | Create an Ingress for the dashboard. It is served under /dashboard/. |
| dashboard.ingress.hosts | list | [{"host":"dashboard.example.com","paths":[{"path":"/","pathType":"Prefix"}]}] | Ingress hosts and paths. Add the host to saleor.allowedClientHosts. |
| dashboard.ingress.tls | list | [] | Ingress TLS configuration. |
| dashboard.podSecurityContext | object | {"fsGroup":101,"runAsGroup":101,"runAsNonRoot":true,"runAsUser":101,"seccompProfile":{"type":"RuntimeDefault"}} | Pod security context. nginx runs as non-root UID 101. |
| dashboard.replicaCount | int | 1 | Dashboard pods. |
| dashboard.resources | object | {"limits":{"memory":"128Mi"},"requests":{"cpu":"10m","memory":"32Mi"}} | Resources for the dashboard container. |
| dashboard.securityContext | object | {"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true} | Container security context. |
| dashboard.service.port | int | 80 | Service port. The dashboard listens on 8080 inside the container. |
| dashboard.service.type | string | "ClusterIP" | Service type. |
| database.existingSecret | string | "" | Name of an existing Secret that holds the connection URL (recommended for production). |
| database.existingSecretKey | string | "database-url" | Key in existingSecret that holds the connection URL. |
| database.url | string | "" | Connection URL (DATABASE_URL), e.g. postgres://saleor:password@postgres:5432/saleor. Stored in a Secret created by this chart. Ignored when existingSecret is set. |
| extraEnv | list | [] | Extra environment variables for the API, worker, beat and migration containers, e.g. any Saleor setting such as DATABASE_URL_REPLICA, DEFAULT_COUNTRY or SENTRY_DSN. |
| extraEnvFrom | list | [] | Extra environment variables from Secrets or ConfigMaps. |
| extraVolumeMounts | list | [] | Extra volume mounts for the Saleor containers. |
| extraVolumes | list | [] | Extra volumes for the API |
Deploy saleor with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has saleor 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartsaleor is pinned at v0.1.14 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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