Resources to deploy custom configurations of Rulebricks and its dependencies via Helm.
- Kubernetes 1.3+
- Helm 3.2.0+
- PV provisioner support (e.g., AWS EBS CSI driver)
- A domain name you control
See External Services for more information on externalizing certain services. See Authentication for more information on what happens after you configure SSO.
# Install from the Rulebricks Helm OCI registry (follow on-screen instructions for DNS & TLS setup)
helm install rulebricks oci://ghcr.io/rulebricks/helm/stack \
--namespace rulebricks \
--create-namespace \
-f your-values.yamlAfter installation, Helm will display instructions for configuring DNS and enabling TLS.
Production deployments should pin both:
- a Helm chart version from the GitHub Releases page
- a Rulebricks product version through
global.version
helm install rulebricks oci://ghcr.io/rulebricks/helm/stack \
--namespace rulebricks \
--create-namespace \
--version 0.2.0 \
-f your-values.yamlglobal:
version: "1.8.17"global.version is the single application semver. It is used for rulebricks/app:<version>, rulebricks/hps:<version>, rulebricks/hps:worker-<version>, and app-backed migration jobs. The chart version controls Kubernetes packaging and infrastructure templates; it does not select the Rulebricks application image version.
| Parameter | Description |
|---|---|
global.domain |
Base domain for the deployment |
global.email |
Admin email (required for TLS certificates) |
global.licenseKey |
Rulebricks Enterprise license key |
global.version |
Rulebricks product version for app, HPS, HPS worker, and migration images |
global.tlsEnabled |
Enable TLS/HTTPS (set after DNS is configured or with external-dns) |
global.externalDnsEnabled |
Add external-dns annotations to ingresses for automatic DNS management |
global.smtp.host |
SMTP server hostname |
global.smtp.port |
SMTP server port |
global.smtp.user |
SMTP username |
global.smtp.pass |
SMTP password |
global.smtp.from |
Sender email address |
global.smtp.fromName |
Sender display name |
global.supabase.anonKey |
Supabase anonymous/public key (required; embedded at template time, global.secrets.secretRef cannot supply it) |
global.supabase.secretRef |
Alternative to inline anonKey: existing Secret carrying the public anon key, injected at runtime |
global.supabase.secretRefKey.anonKey |
Key within that Secret (defaults to anonKey) |
global.supabase.serviceKey |
Supabase service role key |
global.supabase.emails.subjects.* |
Email subject customization (invite, confirmation, recovery, emailChange) |
global.supabase.emails.templates.* |
Email template URLs (invite, confirmation, recovery, emailChange) |
global.supabase.url |
External Supabase URL (leave empty for self-hosted) |
global.supabase.projectRef |
Project reference (Cloud Supabase) |
global.supabase.accessToken |
Access token for Supabase CLI (Cloud Supabase) |
global.supabase.jwtSecret |
JWT signing secret (self-hosted only) |
global.sso.enabled |
Enable Enterprise SSO |
global.sso.provider |
SSO provider: azure, google, okta, keycloak, ory, other |
global.sso.url |
Identity provider URL (required except for Google) |
global.sso.clientId |
OAuth client ID from your IdP |
global.sso.clientSecret |
OAuth client secret from your IdP |
global.secrets.secretRef |
Reference to existing K8s secret (optional) |
global.scheduling.nodeSelector |
Optional selector for workloads that inherit global scheduling |
global.scheduling.tolerations |
Optional tolerations for workloads that inherit global scheduling |
global.scheduling.affinity |
Optional affinity for workloads that inherit global scheduling |
global.labels |
Labels applied to all resource metadata |
global.annotations |
Annotations applied to all resource metadata |
global.podLabels |
Labels applied to pod templates only |
global.podAnnotations |
Annotations applied to pod templates only |
global.storage.* |
Shared object storage used by the decision-log archive and DB backups |
backup.enabled |
Enable self-hosted Supabase Postgres backups |
backup.schedule |
Cron schedule for Barman base backups |
backup.retentionDays |
Number of days to retain restorable backups |
backup.ttlSecondsAfterFinished |
Seconds to retain completed backup Jobs and pod logs |
backup.jobHistory.* |
CronJob history limits for completed backup Jobs |
migrations.ttlSecondsAfterFinished |
Seconds to retain completed migration Jobs and pod logs |
externalSecrets.installOperator |
Install the namespace-scoped External Secrets Operator dependency |
Secrets
The chart consumes credentials from pre-existing Kubernetes Secrets through
*.secretRef / *.existingSecret values and renders no vault-specific
resources itself. This keeps the integration identical on AWS, Azure, and GCP,
and compatible with whatever secrets platform you already run. When a seam is
left empty, the chart falls back to creating the Secret from inline values.
The canonical inventory of every Secret and key lives in
.secrets.example. The seams:
| Secret role | Values seam | Keys |
|---|---|---|
| Application (app, HPS, workers, SSO, managed migrations) | global.secrets.secretRef (+ secretRefKeys) |
LICENSE_KEY, EMAIL, SMTP_USER, SMTP_PASS, SUPABASE_*, JWT_SECRET, SSO_CLIENT_*, REDIS_PASSWORD, KAFKA_SASL_* |
| Browser anon key (runtime) | global.supabase.secretRef (+ secretRefKey) |
anonKey |
| Supabase JWT | supabase.secret.jwt.secretRef |
secret, anonKey, serviceKey |
| Postgres | supabase.secret.db.secretRef or supabase.externalDatabase.secretRef |
username, password, database (+ host, port external) |
| External DB bootstrap | supabase.externalDatabase.bootstrap.secretRef |
master-username, master-password, service-password |
| Supabase dashboard | supabase.secret.dashboard.secretRef |
username, password |
| Supabase auth SMTP | supabase.secret.smtp.secretRef |
username, password |
| Supabase Realtime | supabase.secret.realtime.secretRef |
SECRET_KEY_BASE, DB_ENC_KEY |
| ClickHouse | clickhouse.auth.existingSecret |
admin-password |
| FerretDB | clickstack.ferretdb.auth.existingSecret |
password |
| Image pull | global.registry.existingPullSecret |
.dockerconfigjson (defaults to a Secret built from global.licenseKey) |
Path A — sync from your secrets platform (recommended). Use the
External Secrets Operator to sync vault entries
into the Secrets above. Copy-paste manifests with per-cloud identity wiring
(IRSA / EKS Pod Identity, AKS Workload Identity, GKE Workload Identity) live in
examples/external-secrets/. ESO also supports
HashiCorp Vault, 1Password, Doppler, and most other platforms with the same
ExternalSecret shape. If ESO is not already managed at cluster scope, set
externalSecrets.installOperator: true to install a namespace-scoped operator
whose images pull from the mirrored docker.io/rulebricks/* registry.
Path B — Secrets Store CSI driver. The managed add-ons (AKS
azureKeyvaultSecretsProvider, EKS ASCP, GKE Secret Manager provider) also
work, but they deliver secrets as mounted files: you must enable their
sync-as-Kubernetes-Secret feature and keep at least one pod mounting the CSI
volume for the sync to happen. ESO avoids both caveats, so prefer Path A unless
your platform mandates CSI.
Path C — no vault. Copy each relevant section of
.secrets.example into its own env file, fill in values,
and create the Secrets directly:
kubectl create secret generic rulebricks-app -n rulebricks \
--from-env-file=app.envThen point the seams at your Secret names in values:
global:
secrets:
secretRef: rulebricks-app
supabase:
secret:
jwt: { secretRef: rulebricks-supabase-jwt }
db: { secretRef: rulebricks-supabase-db }Caveats: the chart-created FerretDB Secret stores its password under
ferretdb-password, while the BYO seam defaults to password
(clickstack.ferretdb.auth.existingSecretKey overrides it). Do not name a BYO
ClickHouse Secret <release>-clickhouse-credentials — that exact name stays
chart-managed and a synced Secret would fight Helm for ownership; when
overriding clickhouse.auth.existingSecret, also set
rulebricks.app.clickhouse.existingSecret and (with ClickStack)
clickstack.clickhouse.existingSecret to the same name.
Migration from externalSecrets.* values (pre-2026 charts). Older chart
versions documented externalSecrets.enabled / remoteRefs /
targetSecretName for overlay workflows, and one interim version rendered an
Azure-only SecretStore/ExternalSecret from them. Those values are now ignored
(only installOperator remains). Move any ExternalSecret definitions into
manifests you apply yourself — see examples/external-secrets/azure-key-vault.yaml
for the equivalent of the removed Azure template.
Monitoring and Remote Write
Monitoring is enabled by default through kube-prometheus-stack. Prometheus stores metrics in-cluster unless you configure kube-prometheus-stack.prometheus.prometheusSpec.remoteWrite.
Rulebricks adds ServiceMonitors for the app and HPS services:
- App metrics are scraped from
/api/metricsand cover app/admin API request counts, latency histograms, coarse rejections, and frontend error counts. - HPS metrics are scraped from
/metricsand cover rule-engine request counts, latency histograms, rejections, Kafka worker wait time, bulk/parallel item volume, and memory cache stats. - Kafka JMX and ClickHouse ServiceMonitors are enabled where those charts expose Prometheus endpoints. ClickHouse metrics only apply when
clickhouse.enabled=true. Traefik's Prometheus endpoint is enabled, but its ServiceMonitor is left as an explicit opt-in because the Traefik chart validates the Prometheus Operator CRD during template rendering.
Metric labels are intentionally bounded to avoid Prometheus cardinality problems. Labels use route templates, methods, status classes, operations, and coarse reasons. They do not include API keys, users, organizations, IP addresses, raw URLs, rule slugs, flow slugs, or error messages.
monitoring:
enabled: true
kube-prometheus-stack:
prometheus:
prometheusSpec:
remoteWrite:
- url: "https://prometheus-prod-XX.grafana.net/api/prom/push"
basicAuth:
username:
name: prometheus-remote-write
key: username
password:
name: prometheus-remote-write
key: passwordUseful queries:
histogram_quantile(0.95, sum(rate(rulebricks_hps_http_request_duration_seconds_bucket[5m])) by (le, route))
sum(rate(rulebricks_hps_rejections_total[5m])) by (route, reason)
histogram_quantile(0.95, sum(rate(rulebricks_hps_kafka_request_duration_seconds_bucket[5m])) by (le, operation))
sum(rate(rulebricks_hps_bulk_items_total[5m])) by (operation)
sum(rate(rulebricks_app_frontend_errors_total[5m])) by (source)
After install, verify scrape discovery with:
kubectl get servicemonitor -n rulebricks
kubectl port-forward -n rulebricks svc/rulebricks-kube-prometheus-stack-prometheus 9090:9090Shared Object Storage and Database Backups
Rulebricks uses one shared cloud provider, identity, and bucket/container for all storage-backed features. Raw decision logs, native ClickHouse objects, and database backups use separate key prefixes under global.storage.paths.*.
global:
storage:
provider: s3 # s3, azure-blob, or gcs
bucket: my-rulebricks-data
region: us-west-2
s3:
iamRoleArn: arn:aws:iam::123456789012:role/rulebricks-storage
paths:
decisionLogs: decision-logs
dbBackups: db-backups
backup:
enabled: true
schedule: "0 2 * * *"
retentionDays: 30
ttlSecondsAfterFinished: 2592000
jobHistory:
successful: 30
failed: 30
clickhouse:
persistence:
enabled: true
size: 100Gi
temp:
sizeLimit: 20GiUpgrade note: older values that split storage into global.storage.decisionLogs.* and global.storage.dbBackups.* (per-purpose buckets/regions) are still honored as overrides, but new installs should use the unified global.storage.bucket, global.storage.region, and global.storage.paths.* shape shown above.
Decision logs are written twice, on purpose and to two different places.
Vector writes the raw NDJSON archive to object storage under
paths.decisionLogs: this is the durable copy, and the only decision-log data
in object storage. With clickhouse.persistence.enabled: true, Vector also
inserts each log into the rulebricks.decision_logs table on the ClickHouse
PVC: a hot store of the most recent logs, which is what the app lists,
searches and serves through its API. ClickHouse writes no tables to object
storage. A size-limited emptyDir at /var/lib/clickhouse/tmp holds query
spill, and ClickHouse file logs use information level, 100 MB files, three
retained rotations, and a separate 1 GiB emptyDir. With persistence
disabled, ClickHouse is the stateless Deployment/emptyDir archive-view mode
with no PVC, and ClickStack must also be disabled.
clickhouse.persistence.size sets the volume available for recent logs and
ClickStack telemetry.
Releases 0.3.78 and later kept ClickHouse tables in object storage under
paths.clickhouse, with a read cache on a second PVC and no eviction. A
pre-upgrade hook moves such a release back: when it finds object-storage
tables it drops the ClickHouse databases named rulebricks and otel before
the new server starts, which also deletes their objects under
paths.clickhouse, and the hot store refills from new logs. Tables already on
the PVC are kept. Supabase, backups, and the raw decision-log archive are not
touched. The read-cache PVC (<release>-clickhouse-cache) is removed by the
upgrade.
An existing release needs one ordinary upgrade with rulebricks upgrade or
helm upgrade with the release's own values file. To reuse overrides saved by
Helm, use --reset-then-reuse-values so the new Vector defaults take effect.
The drop is quick (a 623 GiB,
164,000-object store on Azure Blob took under a minute, the whole upgrade
seven). The log tables are recreated at the end of the upgrade. Vector resumes
pending writes once the tables are ready.
After an object-storage cutover, the hot store holds logs written since the upgrade. Links to earlier executions read their traces from the archive.
A rollback does not undo the drop. If an upgrade fails after it, run the
upgrade again: the compatibility marker advances only after schema seeding
and the storage audit succeed, so a retry is safe. After the upgrade,
paths.clickhouse is no longer used and can be removed from values files;
anything left under that prefix can be deleted.
ClickStack's regular upstream tables retain their default 30-day TTL for disposable operational telemetry and share the PVC with decision logs. The optional PromQL TimeSeries schema is disabled because its inner tables have no upstream TTL. Lifecycle rules may be applied to the raw archive prefix.
Backups use Barman cloud tooling and are available only for self-hosted Supabase. By default, restorable backup data is retained for 30 days, and completed backup Jobs and their pod logs are retained for 30 days through both CronJob history limits and Kubernetes Job TTL. The default history limits assume the default daily schedule; increase backup.jobHistory.successful and backup.jobHistory.failed if you run backups more frequently and need every completed Job to remain visible for the full 30-day TTL window.
The backup CronJob runs with the same workload identity pattern used by Vector and ClickHouse, so bucket credentials stay in Kubernetes service account configuration instead of the database container. Migration Jobs use migrations.ttlSecondsAfterFinished, which also defaults to 30 days.
Single Sign-On via OIDC
Enable Single Sign-On via OIDC with your identity provider:
global:
sso:
enabled: true
provider: "ory" # azure, google, okta, keycloak, ory, other
url: "https://your-org.projects.oryapis.com"
clientId: "<client-id>"
clientSecret: "<client-secret>"Native providers (azure, google, okta, keycloak) work directly with Supabase. If using Supabase Cloud, configure the appropriate provider in the Supabase Dashboard.
Custom providers (ory, other) use the app's built-in OIDC proxy to translate paths. If using Supabase Cloud, configure Keycloak in the Supabase Dashboard with:
- Realm URL:
https://<your-domain>/api/sso-proxy - Client ID/Secret: Same as your
values.yaml
Automatic DNS with External-DNS
For single-phase installation without manual DNS configuration, you can use external-dns to automatically create DNS records.
helm install rulebricks oci://ghcr.io/rulebricks/helm/stack \
--namespace rulebricks \
--create-namespace \
-f your-values.yaml \
--set external-dns.enabled=true \
--set global.externalDnsEnabled=true \
--set global.tlsEnabled=trueConfigure provider-specific settings in your values file:
external-dns:
enabled: true
provider: route53 # or: cloudflare, google, azure
global:
externalDnsEnabled: true
tlsEnabled: trueIf external-dns is already installed in your cluster:
helm install rulebricks oci://ghcr.io/rulebricks/helm/stack \
--namespace rulebricks \
--create-namespace \
-f your-values.yaml \
--set global.externalDnsEnabled=true \
--set global.tlsEnabled=trueThis adds the necessary annotations to ingresses for your existing external-dns to discover.
When global.externalDnsEnabled=true, the following records are configured:
<global.domain>→ Traefik LoadBalancersupabase.<global.domain>→ Traefik LoadBalancer (if self-hosting Supabase)
Using Supabase Cloud
Even if you use Supabase Cloud instead of self-hosting, this chart will automatically configure your project. You will need to find and provide certain information from your newly created account/project as values.
-
Create a Supabase project at supabase.com if you haven't already.
-
Generate an access token from Supabase Dashboard: Account Settings > Access Tokens.
-
Get your project details from the Supabase Dashboard:
- Project URL (e.g.,
https://abcdefghijkl.supabase.co) - Anon (public) key
- Service role key
- Project URL (e.g.,
-
Configure Helm values:
supabase: enabled: false global: supabase: url: "https://<project-ref>.supabase.co" anonKey: "<your-anon-key>" serviceKey: "<your-service-role-key>" accessToken: "<your-supabase-access-token>" # Optional: explicitly set project ref (derived from URL if empty) projectRef: ""
The migration job will:
- Authenticate with your Supabase account using the access token
- Link to your project
- Push the database schema via
supabase db push - Configure auth settings based on your domain
External Kafka SSL/SASL
To use external/managed Kafka, set kafka.enabled: false and configure rulebricks.app.logging.kafkaBrokers plus the optional kafkaSsl / kafkaSasl settings. The chart exposes these to the app, HPS, HPS workers, Vector, the KEDA lag scalers, and kafka-exporter. The wait-for-kafka init container is automatically skipped when kafkaBrokers is set.
Several components connect to Kafka: HPS (KafkaJS, produces/consumes the solution + logs topics), Vector (consumes the logs topic for the decision-log archive), the KEDA operator (reads consumer-group lag for autoscaling), and kafka-exporter (Prometheus metrics). They have different auth capabilities, so the right preset depends on your provider:
Mechanism (kafkaSasl.mechanism) |
app / HPS | KEDA lag scaling | kafka-exporter | Vector | Topic provisioning |
|---|---|---|---|---|---|
| (empty) — in-cluster plaintext | native | native | native | native | Strimzi Topic Operator |
plain / scram-sha-256 / scram-sha-512 (Redpanda, Confluent, Event Hubs $ConnectionString) |
native | native (secret TriggerAuthentication) | native | native | create topics yourself / auto-create |
aws-iam (AWS MSK) |
native (pod IAM identity) | native (operator pod identity) | native via IRSA only (auto-skipped until annotated) | kafka-proxy bridge | kafka-proxy bridge job |
oauthbearer (GCP Managed Kafka) |
native (workload identity) | skipped — CPU trigger only | skipped | kafka-proxy bridge | kafka-proxy bridge job |
The default large-payload profile requires an external broker that supports 64 MiB records. Configure the broker before installing the chart:
message.max.bytes >= 67108864replica.fetch.max.bytes >= 134217728and, where exposed,replica.fetch.response.max.bytes >= 134217728solutionandsolution-responsetopicmax.message.bytes >= 33554432logstopicmax.message.bytes >= 67108864
The bridge provisioning hook creates missing topics and reconciles their
max.message.bytes on upgrades, but it cannot change broker-level settings.
Direct PLAIN/SCRAM brokers remain customer-managed. MSK Serverless, Azure Event
Hubs, and current Confluent Cloud tiers do not support the 64 MiB decision-log
record ceiling; use a provisioned/self-managed Kafka tier that does, or override
the complete HPS/Kafka/Vector payload envelope to fit the provider's limit.
AWS MSK with IAM auth — credentials come from pod identity (IRSA), no static secrets:
kafka:
enabled: false
rulebricks:
app:
logging:
enabled: true
kafkaBrokers: "b-1.msk.example:9098,b-2.msk.example:9098"
kafkaSsl: true
kafkaSasl:
mechanism: "aws-iam"
region: "us-east-1"
hps:
serviceAccount:
create: true
annotations:
eks.amazonaws.com/role-arn: "arn:aws:iam::ACCOUNT:role/msk-access"
# Kafka metrics on MSK require IRSA (kafka-exporter does not support EKS Pod
# Identity); the exporter is skipped until this annotation is set:
kafkaExporter:
serviceAccount:
annotations:
eks.amazonaws.com/role-arn: "arn:aws:iam::ACCOUNT:role/msk-metrics-read"
# Lag-based autoscaling: the KEDA operator's own identity signs the MSK
# connection - via IRSA (below) or a Pod Identity association with "keda-operator":
keda:
podIdentity:
aws:
irsa:
enabled: true
roleArn: "arn:aws:iam::ACCOUNT:role/msk-metrics-read"
# Vector cannot speak MSK IAM directly, so it uses the kafka-proxy bridge sidecar:
kafkaBridge:
enabled: true
provider: "aws"
region: "us-east-1"
brokers: "b-1.msk.example:9098,b-2.msk.example:9098"
awsRoleArn: "arn:aws:iam::ACCOUNT:role/msk-access"
vector:
serviceAccount:
create: true
annotations:
eks.amazonaws.com/role-arn: "arn:aws:iam::ACCOUNT:role/msk-access"
extraContainers:
- name: kafka-proxy
image: grepplabs/kafka-proxy:latest
args:
- server
- --bootstrap-server-mapping=b-1.msk.example:9098,127.0.0.1:19092
- --bootstrap-server-mapping=b-2.msk.example:9098,127.0.0.1:19093
- --tls-enable
- --sasl-enable
- --sasl-method=AWS_MSK_IAM
- --sasl-aws-region=us-east-1
ports:
- containerPort: 19092HPS must include the KafkaJS oauthbearer implementation using aws-msk-iam-sasl-signer-js; the chart only passes configuration to the pods.
The kafka-exporter and KEDA operator roles need kafka-cluster:Connect, kafka-cluster:DescribeCluster, kafka-cluster:DescribeTopic, and kafka-cluster:DescribeGroup on the cluster, topic, and group ARNs (metadata-only; no ReadData required). Until the KEDA operator's identity is attached, the lag triggers error and the CPU trigger keeps scaling working.
SASL PLAIN/SCRAM clusters (Redpanda, Confluent, self-managed Kafka) — every component (HPS, Vector, KEDA lag scaling, kafka-exporter) inherits the same kafkaSasl credentials automatically; nothing else to configure. For self-signed broker certificates set rulebricks.kafkaExporter.tlsInsecureSkipVerify: true (and use kafkaExporter.extraArgs for anything exotic, e.g. --tls.server-name=...).
Azure Event Hubs (Kafka endpoint) — SASL PLAIN with the namespace connection string. Both HPS and Vector connect directly; no bridge sidecar required:
kafka:
enabled: false
rulebricks:
app:
logging:
enabled: true
kafkaBrokers: "my-namespace.servicebus.windows.net:9093"
kafkaSsl: true
kafkaSasl:
mechanism: "plain"
username: "$ConnectionString"
password: "Endpoint=sb://my-namespace.servicebus.windows.net/;SharedAccessKeyName=...;SharedAccessKey=..."
# or: existingSecret / existingSecretUsernameKey / existingSecretPasswordKeyGCP Managed Service for Apache Kafka — OAUTHBEARER (Workload Identity) is preferred; the Vector bridge runs the GCP local auth-token server sidecar (kafkaBridge.provider: "gcp", gcpServiceAccountEmail). A simpler plain/SCRAM credential also works for both consumers but uses static credentials.
Vector's Kafka source natively supports SSL + SASL PLAIN/SCRAM, but not token mechanisms (aws-iam, oauthbearer). For those, the kafkaBridge sidecar authenticates upstream using the Vector pod's workload identity and exposes a local plaintext listener that Vector consumes from. The CLI sets all of this automatically when you externalize Kafka; the values above are for hand-installs.
Forwarding Decision Logs
This is one example of forwarding rule execution (decision) logs to S3. Under the hood, we use Vector, which can be configured to forward logs to a wide variety of otherdestinations.
See the Vector documentation for more information.
To send rule execution logs to S3:
-
Create an IAM policy (
vector-s3-policy.json):{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": ["s3:PutObject", "s3:PutObjectAcl"], "Resource": "arn:aws:s3:::YOUR_BUCKET/*" }, { "Effect": "Allow", "Action": ["s3:ListBucket", "s3:GetBucketLocation"], "Resource": "arn:aws:s3:::YOUR_BUCKET" } ] } -
Set up IRSA (IAM Roles for Service Accounts):
# Create OIDC provider (if needed) eksctl utils associate-iam-oidc-provider --cluster=YOUR_CLUSTER --approve # Create IAM policy aws iam create-policy --policy-name VectorS3Access --policy-document file://vector-s3-policy.json # Create service account eksctl create iamserviceaccount \ --cluster=YOUR_CLUSTER \ --namespace=rulebricks \ --name=vector-s3-access \ --attach-policy-arn=arn:aws:iam::YOUR_ACCOUNT:policy/VectorS3Access \ --approve
-
Configure Vector in
values.yaml:vector: serviceAccount: name: vector-s3-access customConfig: sinks: s3: type: aws_s3 inputs: - kafka bucket: "your-logs-bucket" region: "us-east-1" key_prefix: "rulebricks/logs/%Y/%m/%d/" compression: gzip encoding: codec: json except_fields: [request_fields, response_fields, search_record_id]
For GCS or Azure Blob, see the Vector sinks documentation.
Node Scheduling (Optional)
The default chart does not require node labels, taints, architecture selectors, hard affinity, or multiple nodes. A single shared node pool is supported as long as the cluster has enough CPU, memory, and storage for the requested pods.
By default, pod templates are labeled with rulebricks.com/workload-group. Infrastructure includes the frontend app, Valkey, Kafka, Supabase, Traefik, KEDA, cert-manager, and Vector. The compute path is HPS and HPS workers.
HPS and HPS workers use soft pod anti-affinity to prefer nodes that do not already run rulebricks.com/workload-group=infrastructure pods. This keeps one-node deployments valid while biasing CPU-intensive compute pods away from core services when additional nodes are available.
For normal AMD64 or ARM64 nodes, no architecture-specific Helm values are required. Multi-arch images allow Kubernetes to pull the correct image variant for the node. If your cluster taints ARM64 nodes, add the relevant tolerations explicitly:
global:
scheduling:
tolerations:
- key: kubernetes.io/arch
operator: Equal
value: arm64
effect: NoSchedule
cert-manager:
tolerations:
- key: kubernetes.io/arch
operator: Equal
value: arm64
effect: NoSchedule
webhook:
tolerations:
- key: kubernetes.io/arch
operator: Equal
value: arm64
effect: NoSchedule
cainjector:
tolerations:
- key: kubernetes.io/arch
operator: Equal
value: arm64
effect: NoSchedule
migrations:
tolerations:
- key: kubernetes.io/arch
operator: Equal
value: arm64
effect: NoScheduleAvoid nodeSelector or requiredDuringSchedulingIgnoredDuringExecution unless your platform team intentionally wants hard placement. global.scheduling is honored by Rulebricks workloads and migration jobs; dependency subcharts such as Kafka, Supabase, cert-manager, Traefik, KEDA, and Vector may require their own scheduling values.
Image Manifest (Single Source of Truth)
images/manifest.yaml pins every docker.io/rulebricks/* infrastructure image the chart pulls (the app/HPS/worker images are governed by global.version instead). The mirror pipeline (.github/workflows/mirror-images.yml) publishes from it, scripts/images/verify-versions.sh checks a rendered chart against it when run by hand, and — because the manifest ships inside the published chart tarball — the Rulebricks CLI resolves image tags from it at deploy time for the exact chart version being installed. This makes the manifest a public contract: keep the entry schema and existing image names stable (or coordinate a CLI release), and never exclude images/ via .helmignore (the release workflow fails the package if the manifest is missing from the tarball).
Kafka Image Publishing
The vendored Kafka subchart defaults to docker.io/rulebricks/kafka so installs do not depend on the upstream image namespace at deploy time. Publish the default Kafka tag as a multi-arch manifest before releasing chart changes that reference it:
KAFKA_TAG=4.0.0-debian-12-r10 bash scripts/publish-kafka-image.shThe script verifies that the source image has both linux/amd64 and linux/arm64 variants, then republishes the manifest list under docker.io/rulebricks/kafka:<tag>. The Helm chart release workflow runs the same publish step before packaging the chart.
The release workflow requires DOCKERHUB_USERNAME and DOCKERHUB_TOKEN repository secrets with write access to docker.io/rulebricks/kafka.
Gateway API (Alternative to Ingress)
Use Kubernetes Gateway API instead of traditional Ingress resources:
rulebricks:
ingress:
type: "gateway-api" # default: "ingress"
hostname: "app.example.com" # override default (global.domain)
gatewayApi:
gatewayName: "my-gateway"
gatewayNamespace: "gateway-system"This renders HTTPRoute resources instead of Ingress. Requires a Gateway API implementation (e.g., Envoy Gateway, Cilium, Istio) in your cluster.
ingress.type |
Resource Created | Use Case |
|---|---|---|
ingress |
Ingress |
Standard ingress controllers (nginx, Traefik) |
gateway-api |
HTTPRoute |
Gateway API implementations |
Use ingress.hostname when your application hostname differs from global.domain (e.g., rulebricks.example.com vs example.com).
The observability and Valkey Admin endpoints can use the same Gateway API parent:
clickstack:
hyperdx:
ingress:
enabled: true
type: "gateway-api"
hostname: "observability.example.com" # defaults to observability.<global.domain>
gatewayApi:
gatewayName: "my-gateway"
gatewayNamespace: "gateway-system"
rulebricks:
cache:
valkeyAdmin:
enabled: true
exposure: ingress
ingress:
enabled: true
type: "gateway-api"
hostname: "valkey.example.com" # defaults to valkey.<global.domain>
annotations: {} # attach Gateway/controller-specific auth policy hooks here
gatewayApi:
gatewayName: "my-gateway"
gatewayNamespace: "gateway-system"Valkey Admin's built-in Traefik BasicAuth/IP whitelist resources only apply when type: "ingress". For type: "gateway-api", protect valkey.<global.domain> with your Gateway implementation's auth policy or an external auth proxy.
External Auth Proxy Routing
If Rulebricks is fronted by an external auth proxy such as Oathkeeper, you can suppress chart-owned app routing while keeping HPS API routes managed by the chart:
rulebricks:
ingress:
enabled: true
app:
enabled: falseUse rulebricks.ingress.enabled: false instead when your own Ingress or HTTPRoute should own both the app catch-all route and HPS API routes.
Exposing Supabase Studio
Supabase Studio can be exposed on a separate hostname from the app and Kong API:
supabase:
studio:
ingress:
enabled: true
type: "ingress" # or "gateway-api"
hostname: "studio.example.com" # defaults to studio.<global.domain>
annotations: {}For Gateway API, set supabase.studio.ingress.type: gateway-api and configure supabase.studio.ingress.gatewayApi.gatewayName. Studio dashboard authentication is controlled by supabase.secret.dashboard.username and supabase.secret.dashboard.password.
External Supabase Database Secret
For managed Postgres, supabase.externalDatabase.secretRef can provide the full connection tuple from one Secret. Leave host/port empty to keep using inline values, or set those keys to source DB_HOST/DB_PORT from the Secret too:
supabase:
externalDatabase:
enabled: true
secretRef: "supabase-db"
secretRefKey:
host: host
port: port
username: username
password: password
database: databaseThe Secret values are consumed by the Supabase auth, rest, realtime, meta pods and the external database bootstrap job.
External Valkey / Redis-Compatible Cache
Use an external/managed Valkey or Redis-compatible endpoint instead of the bundled Valkey deployment. Set rulebricks.redis.enabled: false and provide connection details under rulebricks.redis.external. The redis key is retained for compatibility with existing chart values.
Basic TCP connection with inline password:
rulebricks:
redis:
enabled: false
external:
host: "valkey.example.com"
port: 6379
password: "super-secret" # injected at runtime; never written to a ConfigMap
tls:
enabled: true # uses rediss:// schemeReference an existing secret instead of an inline password (recommended for production):
rulebricks:
redis:
enabled: false
external:
host: "valkey.example.com"
existingSecret: "my-valkey-auth"
existingSecretKey: "redis-password"
tls:
enabled: trueUpstash-style HTTP API (bypasses the in-cluster serverless-redis-http bridge):
rulebricks:
redis:
enabled: false
external:
host: "valkey.example.com" # still required for the direct Valkey/Redis-compatible client
httpApi:
enabled: true
# inline:
url: "https://my-db.upstash.io"
token: "AX..."
# or via an existing secret:
existingSecret: "my-upstash-creds"
existingSecretUrlKey: "redis-url"
existingSecretTokenKey: "redis-token"When rulebricks.redis.enabled is false, the chart skips the internal Valkey Deployment and Redis-compatible Service/PVC names, then points both the app and the serverless-redis-http bridge at your external instance. Passwords are injected via env at container start (using $(REDIS_PASSWORD) expansion) so they never land in a ConfigMap. The schema requires external.host to be set whenever the bundled cache is disabled.
Auth URL Configuration
Override computed authentication URLs when your application hostname differs from the base domain:
supabase:
auth:
# Override GOTRUE_SITE_URL (default: https://<global.domain>)
siteUrl: "https://app.example.com"
# Override API_EXTERNAL_URL (default: https://supabase.<global.domain>)
externalUrl: "https://auth.example.com"
# Add URLs to GOTRUE_URI_ALLOW_LIST
additionalRedirectUrls:
- "https://app.example.com/callback"
- "https://staging.example.com/*"Migration Job Strategy
Control how database migrations are executed:
migrations:
strategy: "hook" # default| Strategy | Behavior | Use Case |
|---|---|---|
hook |
Runs as Helm post-install/post-upgrade hook | Standard deployments |
deployment |
Creates job as regular resource | When post-rendering is needed |
manual |
Renders template without hooks | Full control over execution |
Extra Environment Variables
Inject additional environment variables into the application:
rulebricks:
app:
extraEnv:
- name: MY_CUSTOM_VAR
value: "my-value"
- name: SECRET_VAR
valueFrom:
secretKeyRef:
name: my-secret
key: secret-key
extraEnvFrom:
- configMapRef:
name: my-configmapGlobal Labels and Annotations
Apply labels and annotations to all resources (useful for compliance, cost allocation, monitoring):
global:
# Applied to all resource metadata
labels:
team: platform
cost-center: engineering
annotations:
app.kubernetes.io/part-of: rulebricks
# Applied only to pod templates
podLabels:
sidecar.istio.io/inject: "true"
podAnnotations:
prometheus.io/scrape: "true"Per-Component Pod Labels
For clusters with admission policies (Kyverno, OPA Gatekeeper) requiring specific labels on pods, configure labels at the component level:
rulebricks:
app:
podLabels:
team: platform
redis:
podLabels:
team: platform
serverlessHttp:
podLabels:
team: platform
supabase:
db:
podLabels:
team: platform
auth:
podLabels:
team: platform
kong:
podLabels:
team: platform
rest:
podLabels:
team: platform
realtime:
podLabels:
team: platform
meta:
podLabels:
team: platform
studio:
podLabels:
team: platformThis is useful when cluster policies enforce labels like team, cost-center, or service mesh injection annotations on all pods.
Resource Requests and Limits
Configure CPU/memory requests and limits for each component. This is often required by cluster admission policies:
rulebricks:
app:
resources:
requests:
cpu: "100m"
memory: "256Mi"
limits:
cpu: "1000m"
memory: "1Gi"
redis:
resources:
requests:
cpu: "50m"
memory: "128Mi"
limits:
cpu: "500m"
memory: "512Mi"
serverlessHttp:
resources:
requests:
cpu: "50m"
memory: "64Mi"
limits:
cpu: "200m"
memory: "256Mi"
supabase:
db:
resources:
requests:
cpu: "100m"
memory: "256Mi"
limits:
cpu: "2000m"
memory: "2Gi"
# Similar for: auth, kong, rest, realtime, meta, studioLiveness and Readiness Probes
Configure health check probes for components. Required by some cluster policies:
rulebricks:
app:
livenessProbe:
httpGet:
path: /api/health
port: 3000
initialDelaySeconds: 120
periodSeconds: 10
readinessProbe:
httpGet:
path: /api/health
port: 3000
initialDelaySeconds: 5
periodSeconds: 5
supabase:
auth:
livenessProbe:
httpGet:
path: /health
port: 9999
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
httpGet:
path: /health
port: 9999
initialDelaySeconds: 5
periodSeconds: 5Default probes are configured for most components. Override only when needed for specific requirements.
There are two major components here– our core stack, and Supabase, our db/auth provider.
You can choose to self-host Supabase, or create a project in Supabase Cloud– either way, this chart will try to automate all configuration and migration work for you.
| Component | Description | Enabled |
|---|---|---|
| rulebricks | Core application and high-performance solver (HPS) | ✓ |
| supabase | Backend services (Postgres, Auth, REST API) | ✓ |
| kafka | Message queuing for async rule execution | ✓ |
| traefik | Ingress controller with automatic TLS | ✓ |
| cert-manager | Let's Encrypt certificate provisioning | ✓ |
| keda | Event-driven autoscaling for HPS workers | ✓ |
| vector | Log aggregation and forwarding | ✓ |
| external-dns | Automatic DNS record management | ✗ |
| kube-prometheus-stack | Metrics collection (Prometheus) | ✓ |
Deployment Troubleshooting
helm uninstall rulebricks -n rulebricks
# Clear PVCs
kubectl delete pvc --all -n rulebricks
helm install rulebricks oci://ghcr.io/rulebricks/helm/stack -n rulebricks -f your-values.yaml# Check cert-manager logs
kubectl logs -n cert-manager -l app=cert-manager
# Check certificate status
kubectl get certificates -n rulebricks
kubectl describe certificate rulebricks-tls -n rulebricks
# Check ClusterIssuer
kubectl describe clusterissuer rulebricks-letsencryptThese are usually caused by inaccurate values, or the Supabase Cloud project not being created yet.
kubectl logs job/rulebricks-managed-supabase-setup-1 -n rulebrickskubectl logs job/rulebricks-db-migrate-1 -n rulebricksCheck out our benchmarking toolkit to test application performance under load. It gives you a simple, but out-of-the-box way to evaluate the performance of your Rulebricks deployment and make informed decisions around configuration values.
