You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Self-hosting: using Kubernetes Secrets instead of hardcoded values is not working #2859
# Recommended: existingSecret, must contain at least the following keys:# - SESSION_SECRET# - MAGIC_LINK_SECRET# - ENCRYPTION_KEY# - MANAGED_WORKER_SECRET# - OBJECT_STORE_ACCESS_KEY_ID# - OBJECT_STORE_SECRET_ACCESS_KEYsecrets:
enabled: falseexistingSecret: "your-existing-secret"
Sadly the second version is simply not working.
If you set the secret this way they are not recognized leaving you with a bunch of errors like this one (when starting the web app):
changed the title [-]bug: Using Kubernetes Secrets instead of hardcoded values is not working[/-][+]Self-hosting: using Kubernetes Secrets instead of hardcoded values is not working[/+]on Jan 9, 2026
Exact content of the trigger-production-values.yaml
# REQUIRED: Generate your own secrets using: openssl rand -hex 16secrets:
enabled: false # False to use existing secret - true to specify them here directly (only for testing/dev)existingSecret: "trigger-secret"# Name of the Kubernetes secret created from trigger-secret.yaml# Production webapp configurationwebapp:
# Origin configurationappOrigin: "REDACTED"# Not redacted in the actual fileloginOrigin: "REDACTED"# Not redacted in the actual fileapiOrigin: "REDACTED"# Not redacted in the actual file# Production ingressingress:
enabled: trueclassName: "nginx"annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"nginx.ingress.kubernetes.io/ssl-redirect: "true"hosts:
- host: "REDACTED"# Not redacted in the actual filepaths:
- path: /pathType: Prefixtls:
- secretName: trigger-tlshosts:
- "REDACTED"# Not redacted in the actual fileresources:
limits:
cpu: 2000mmemory: 4Girequests:
cpu: 500mmemory: 1Gi# Production PostgreSQL (or use external)postgres:
primary:
persistence:
enabled: truesize: 20Gi # Keep an eye on this depending on your usagestorageClass: "longhorn"resources:
limits:
cpu: 1000mmemory: 2Girequests:
cpu: 500mmemory: 1Gi# Production Redis (or use external)redis:
master:
persistence:
enabled: truesize: 10Gi # Keep an eye on this depending on your usagestorageClass: "longhorn"resources:
limits:
cpu: 500mmemory: 1Girequests:
cpu: 250mmemory: 512Mi# Production ClickHouseclickhouse:
# Set to true to enable TLS/secure connections in productionsecure: falsepersistence:
enabled: truesize: 10Gi # Keep an eye on this depending on your usagestorageClass: "longhorn"# ClickHouse can be very resource intensive, so we recommend setting limits and requests accordingly# Note: not doing this can cause OOM crashes which will cause issues across many differentresources:
limits:
cpu: 4000mmemory: 16Girequests:
cpu: 2000mmemory: 8Gi# Production S3-compatible object storageminio:
deploy: false # Disable MinIO deployment in productions3:
deploy: false # Disable built-in S3 deployment in production (should be the minio setting above, but just making sure)external:
endpoint: "REDACTED"# Not redacted in the actual fileexistingSecret: "trigger-secret"# Use the same secret created from trigger-secret.yaml (contains OBJECT_STORE_ACCESS_KEY_ID and OBJECT_STORE_SECRET_ACCESS_KEY)existingSecretAccessKeyIdKey: "OBJECT_STORE_ACCESS_KEY_ID"existingSecretSecretAccessKeyKey: "OBJECT_STORE_SECRET_ACCESS_KEY"# Production Registryregistry:
deploy: true # Use the built-in Docker registry for storing imagesauth:
username: "registry-user"password: "your-strong-registry-password"persistence:
enabled: truesize: 45Gi # Keep an eye on this depending on your usagestorageClass: "longhorn"# Production ingressingress:
enabled: trueclassName: "nginx"annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"nginx.ingress.kubernetes.io/ssl-redirect: "true"hosts:
- host: "REDACTED"# Not redacted in the actual filepaths:
- path: /pathType: Prefixtls:
- secretName: registry-tlshosts:
- "REDACTED"# Not redacted in the actual file# Production Supervisor (Kubernetes worker orchestrator)supervisor:
resources:
limits:
cpu: 500mmemory: 1Girequests:
cpu: 250mmemory: 512Mi# Telemetry configurationtelemetry:
enabled: false # Disable telemetry in production
I created this file based on the following resources:
Fixed: Support secrets.existingSecret for Core Secrets
Examine Helm chart templates to understand how secrets.existingSecret is used
Check if environment variables are properly populated from the existing secret
Identify the root cause of why secrets aren't being recognized
Implement the fix
Root Cause
The bug was in webapp.yaml and supervisor.yaml. The templates only checked {{- if .Values.secrets.enabled }} before populating environment variables from secrets. When users set secrets.enabled: false to use existingSecret, the critical environment variables (SESSION_SECRET, MAGIC_LINK_SECRET, ENCRYPTION_KEY, MANAGED_WORKER_SECRET) were never set.
Fix Applied
Changed the condition from:
{{- if .Values.secrets.enabled }}
To:
{{- if or .Values.secrets.enabled .Values.secrets.existingSecret }}
This allows the environment variables to be populated from either:
The chart-generated secret (when secrets.enabled: true)
A user-provided existing secret (when secrets.existingSecret is set)
The trigger-v4.secretsName helper already correctly returns the existingSecret name when provided.
Files Changed
hosting/k8s/helm/templates/webapp.yaml - Fixed condition for SESSION_SECRET, MAGIC_LINK_SECRET, ENCRYPTION_KEY, MANAGED_WORKER_SECRET
hosting/k8s/helm/templates/supervisor.yaml - Fixed condition for MANAGED_WORKER_SECRET
Activity
[-]bug: Using Kubernetes Secrets instead of hardcoded values is not working[/-][+]Self-hosting: using Kubernetes Secrets instead of hardcoded values is not working[/+]matt-aitken commentedon Jan 9, 2026
@TheRealFloatDev can you provide some version numbers and more details about your setup and where you're deploying to?
We have a lot of self-hosters using this setup.
TheRealFloatDev commentedon Jan 9, 2026
Sure.
Regarding "where" I am deploying to:
I am deploying to a RKE2 Kubernetes Cluster, running Hetzner Cloud AMD64 servers.
Regarding the version
I am using the docs-provided install command which automatically uses the latest version of 4.0.
helm upgrade -n trigger --install trigger \ oci://ghcr.io/triggerdotdev/charts/trigger \ --version "~4.0.0" \ -f trigger-production-values.yamlThe version it installed is v4.0.5.
Exact content of the trigger-production-values.yaml
I created this file based on the following resources:
Secret is created like this
Of course with the stringData actually populated
nicktrn commentedon Jan 9, 2026
@claude I think this should be working, please check why it might not be
claude commentedon Jan 9, 2026
Claude finished @nicktrn's task in 2m 9s —— View job •
claude/issue-2859-20260109-1126• Create PR ➔Fixed: Support
secrets.existingSecretfor Core Secretssecrets.existingSecretis usedRoot Cause
The bug was in
webapp.yamlandsupervisor.yaml. The templates only checked{{- if .Values.secrets.enabled }}before populating environment variables from secrets. When users setsecrets.enabled: falseto useexistingSecret, the critical environment variables (SESSION_SECRET,MAGIC_LINK_SECRET,ENCRYPTION_KEY,MANAGED_WORKER_SECRET) were never set.Fix Applied
Changed the condition from:
{{- if .Values.secrets.enabled }}To:
{{- if or .Values.secrets.enabled .Values.secrets.existingSecret }}This allows the environment variables to be populated from either:
secrets.enabled: true)secrets.existingSecretis set)The
trigger-v4.secretsNamehelper already correctly returns theexistingSecretname when provided.Files Changed
hosting/k8s/helm/templates/webapp.yaml- Fixed condition for SESSION_SECRET, MAGIC_LINK_SECRET, ENCRYPTION_KEY, MANAGED_WORKER_SECREThosting/k8s/helm/templates/supervisor.yaml- Fixed condition for MANAGED_WORKER_SECRET|
fix(helm): support secrets.existingSecret for core secrets
nicktrn commentedon Jan 9, 2026
hey @TheRealFloatDev there's a helm prerelease here, any chance you could check this fixes it? will merge when you give the go ahead!
#2860 (comment)
🧭 Helm Chart Prerelease Published
Version:
4.0.5-pr2860.012b943Install:
helm upgrade --install trigger \ oci://ghcr.io/triggerdotdev/charts/trigger \ --version "4.0.5-pr2860.012b943"nicktrn commentedon Jan 14, 2026
will go ahead and get this merged
fix(helm): support secrets.existingSecret for core secrets (triggerdo…