ancient-wolf-19325
06/18/2024, 6:06 PM--propeller.resourcemanager.redis.hostKey but without needing to pass the value on the command line (so the secret is actually hidden). Does flytepropeller support environment variables for adding on to the default config values (so I could just set something like FLYTE_PROPELLER_RESOURCEMANAGER_REDIS_HOSTKEY ) in a secret and mix it into the flytepropeller deployment, or would this need to be more involved (update the actual code for flytepropeller to read from a kubectl secret / env var)? I am hoping I am just missing something obvious π
# Answer
Flytepropeller does not directly support setting configuration values via environment variables in the manner you described. However, you can achieve your goal by using Kubernetes secrets and mounting them in the Flytepropeller deployment. Hereβs how you can do it:
1. Create a Kubernetes Secret: Create a secret that contains your sensitive configuration values.
2. Reference the Secret in the Helm Chart: Modify the values.yaml file of the Flyte Helm chart to reference the secret.
Step-by-Step Guide
1. Create a Kubernetes Secret:
apiVersion: v1
kind: Secret
metadata:
name: flytepropeller-config-secret
namespace: flyte
type: Opaque
stringData:
redis_host_key: <YOUR_REDIS_HOST_KEY>
Apply this secret using kubectl apply -f <your_secret_file.yaml>.
2. Modify the Helm Chart:
Update your values.yaml file to mount the secret in the Flytepropeller container:
propeller:
config:
inlineSecretRef: flytepropeller-config-secret
3. Mount the Secret in the Flytepropeller Deployment:
Modify the Flyte Helm chart to mount the secret as a volume and set the environment variable:
propeller:
extraVolumes:
- name: flytepropeller-config-secret
secret:
secretName: flytepropeller-config-secret
extraVolumeMounts:
- name: flytepropeller-config-secret
mountPath: /etc/flyte/secrets
readOnly: true
env:
- name: FLYTE_PROPELLER_RESOURCEMANAGER_REDIS_HOSTKEY
valueFrom:
secretKeyRef:
name: flytepropeller-config-secret
key: redis_host_key
This approach ensures that the secret value is securely stored and passed to the Flytepropeller without exposing it in plain text.
Would you like more details on any specific part of this process?
Sources:
- Flyte Helm Chart Configuration
- Flyte Configuration Management
Slack Link
https://flyte-org.slack.com/archives/CP2HDHKE1/p1718733948.568349 π 0 button π 0 button π‘ Hint: Mention @runllm in the thread for followups.