After using daytona in an initContainer with the secrets stored to a file, it isn't easy to expose those secrets as environment variables in subsequent containers. I propose to export secrets in a ".env" file, so containers can source that file before starting. Something like:
# in vault:
secret/application/foo/MY_VAR value=fizzbuzz
secret/application/foo/SOME_URL value=http://example.com
# kubernetes
initContainers:
- name: daytona
env:
- name: SECRET_ENV_PATH
value: /home/vault/secrets.env
- name: VAULT_SECRETS_APP
value: secret/application/foo
containers:
- name: my-app
command: ["/bin/bash", "-c"]
args: |
- source /home/vault/secrets.env
./my-app
# /home/vault/secrets.env
export MY_VAR=fizzbuzz
export SOME_URL=http://example.com