Skip to content

Feedback on Secrets Handling – Too Much Repetition, Error-Prone #1535

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

Open
prem-prakash opened this issue May 5, 2025 · 0 comments
Open

Comments

@prem-prakash
Copy link

Hi Kamal team 👋

First of all, thank you for the amazing work on Kamal. It’s a powerful tool that brings the simplicity of Capistrano-style deployments to the container world. The developer experience overall is great, and it’s impressive how much has been streamlined with just a few YAML files.

That said, I’d like to raise a concern about the current approach to managing secrets.

In particular, the .kamal/secrets script ends up being extremely repetitive and verbose, especially when using external secret providers like Doppler. For example, I have to run kamal secrets extract for every single variable:

SECRETS=$(kamal secrets fetch --adapter doppler --from myproject/production VAR1 VAR2 VAR3 ...)

VAR1=$(kamal secrets extract VAR1 $SECRETS)
VAR2=$(kamal secrets extract VAR2 $SECRETS)
VAR3=$(kamal secrets extract VAR3 $SECRETS)
...

This repetition is not only tedious but also increases the risk of human error. If you forget to extract one of the variables, your deployment or accessory config might fail in non-obvious ways. It's also hard to keep the .kamal/secrets file in sync with all the references in deploy.yml.

Suggestion:
Could we have a more concise or declarative way to map secrets from a provider into environment variables, perhaps automatically injecting all fetched secrets into the environment by default? Or maybe support a batch extraction with kamal secrets extract-all that can populate ENV directly?

Again, thanks for the awesome tool — just hoping to see the secrets workflow made as elegant as the rest of Kamal.

Best regards,
Camilo

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

1 participant