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

[TASK] Mount/ re-mount secrets on start #2698

Open
blythed opened this issue Dec 23, 2024 · 1 comment
Open

[TASK] Mount/ re-mount secrets on start #2698

blythed opened this issue Dec 23, 2024 · 1 comment

Comments

@blythed
Copy link
Collaborator

blythed commented Dec 23, 2024

  1. Secrets assumed to be mounted at /session/secrets
  2. Load these as env variables when program starts
  3. Add property to components to listen to certain env variables

Secrets volume looks like this:

|_/session/secrets
   |_OPENAI_API_KEY   // content is "sk-123294323923..."
   |_AWS_ACCESS_KEY_ID 
   |_...
@requires_secrets
def predict(self, X):
    ...

def requires_secrets(f):
    def wrapper(*args, **kwargs):
        try:
            f(*args, **kwargs)
        except MissingSecretException:
            CFG.load_secrets()
            f(*args, **kwargs)
    return wrapper
@fnikolai
Copy link
Collaborator

The path is /run/secrets

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

No branches or pull requests

3 participants
@fnikolai @blythed and others