<@ULVA73B9P> In Prefect 3.7.0 prefect-helm charts ...
# ask-marvin
r
@Marvin In Prefect 3.7.0 prefect-helm charts for prefect-server, how do I get the sub chart for redis to use a kubernetes secret? Can you show an example of the values.yaml?
m
thought for 252.3 seconds
Yes — for the Redis subchart in
prefect-server
, you generally use the Bitnami Redis values under
redis.auth.*
. If you're on Prefect Helm for 3.x /
prefect-server
, the embedded Redis chart supports: -
redis.auth.existingSecret
-
redis.auth.existingSecretPasswordKey
So your
values.yaml
would look like this:
Copy code
yaml
backgroundServices:
  runAsSeparateDeployment: true
  messaging:
    broker: prefect_redis.messaging
    cache: prefect_redis.messaging

redis:
  enabled: true
  architecture: standalone
  auth:
    enabled: true
    existingSecret: my-redis-secret
    existingSecretPasswordKey: redis-password
And the Kubernetes Secret should contain the password key referenced above:
Copy code
yaml
apiVersion: v1
kind: Secret
metadata:
  name: my-redis-secret
type: Opaque
stringData:
  redis-password: super-secret-password
A couple notes: -
existingSecretPasswordKey
defaults to
redis-password
, so if your secret uses that key, you can omit it. - This is specifically for the bundled Redis subchart (
redis.enabled: true
). If instead you are not using the bundled Redis chart and are pointing Prefect to an external Redis instance, the secret wiring is different and goes under `backgroundServices.messaging.redis`:
Copy code
yaml
backgroundServices:
  runAsSeparateDeployment: true
  messaging:
    broker: prefect_redis.messaging
    cache: prefect_redis.messaging
    redis:
      host: my-external-redis
      port: 6379
      existingSecret: my-redis-secret
      existingSecretPasswordKey: redis-password

redis:
  enabled: false
Relevant references: - Prefect Helm chart repo: prefect-helm - Prefect Server chart values: prefect-server chart - Bitnami Redis chart values/docs: Bitnami Redis chart If you want, I can also give you a full working
values.yaml
for either: 1. bundled Redis subchart with secret, or 2. external Redis with secret.