bacalhau-project / bacalhau

Compute over Data framework for public, transparent, and optionally verifiable computation
https://docs.bacalhau.org
Apache License 2.0
697 stars 89 forks source link

Allow mounting of an entire file of environment variables #1654

Open aronchick opened 1 year ago

aronchick commented 1 year ago

Encrypted, but such a great feature

https://twitter.com/qovery_/status/1611683689531953153?s=46&t=JGpmDh-fgirG7nE542gE_w

wdbaruni commented 4 months ago

to keep this in mind while working on #2742 if the env values must be encrypted

wdbaruni commented 4 months ago

Actually, we kind of already have this feature through #3020.

# include all env variables
bacalhau job run  job.yaml --template-envs ".*"
  -E, --template-envs string           Specify a regular expression pattern for selecting environment variables to be included as template variables in the job spec.
                                       e.g. --template-envs ".*" will include all environment variables.
  -V, --template-vars stringToString   Replace a placeholder in the job spec with a value. e.g. --template-vars foo=bar (default [])

You first need to load your env variables from the file into your terminal, and then allow parsing them into your template through --template-envs ".*"

Do you think this is enough of should we add a new --template-vars-file to read template variables from a file?