Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secret support #423

Open
guesswh0 opened this issue Oct 12, 2022 · 3 comments
Open

Secret support #423

guesswh0 opened this issue Oct 12, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@guesswh0
Copy link

guesswh0 commented Oct 12, 2022

There is case when it is required to read envs from files e.g. kubernetes mounted secret volume:

    spec:
      ...
        volumeMounts:
          - name: webapp-secret
            mountPath: "/mnt/secrets"
            readOnly: true
        imagePullPolicy: Never
      ...

I would be happy to see such enhancement!

@sergeyklay sergeyklay added the enhancement New feature or request label Mar 1, 2023
@bj00rn
Copy link

bj00rn commented Aug 23, 2023

FileAwareEnv should take care of this for you unless im mistaken. At least in compose

python

env = environ.FileAwareEnv(
    DJANGO_SECRET_KEY=(str, ""),
 )

compose

    environment:
      - DJANGO_SECRET_KEY_FILE=/run/secrets/django_secret_key
    secrets:
      - django_secret_key

@pataquets
Copy link

[Issue gardening]
@guesswh0 Does the answer solve your need? (ie. can this issue be closed?)

@pataquets
Copy link

@guesswh0 ping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants