Use Kubernetes secrets to deploy Sentry

Hi,

I’m deploying sentry in our Kubernetes cluster with Helm by running :

helm install --name mon -f sentry-values.yml stable/sentry

cat sentry-values.yml

user:
create: true
email: my@example.com

email:
from_address: noreply@sentry.example.com
host: my-email-smtp
port: 587
use_tls: true
user: my-user-name
password: my-password
enable_replies: false

As you can see I have hardcoded the username and password … I would like to create these in Kubernetes as secrets resources and instruct the Helm installation to use them.

Can you please advise ?

I dunno anything about the helm chart since we don’t maintain or support it, but I’d suggest just passing them in as environment variables through kubernetes.

Something like:

  env:
  - name: SENTRY_EMAIL_PASSWORD
    valueFrom:
      secretKeyRef:
        name: sentry-email-password
        key: password

Or whatever your secret names are.

Or frankly, just pass in the entire config file through a ConfigMap. Possibilities are endless.