-
Notifications
You must be signed in to change notification settings - Fork 490
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
Support secrets of type environment
#671
Comments
Yesterday I made an ugly hack in an attempt to get it working :)
More or less it is working quite fine for me now.
|
I'll wait for henryreed to complete is PR and then if he did not solve it, I'll accept yours |
Sure, no problem. As I said this is just an ugly hack to get it working. I will prepare a PR as soon as I am ready.
Ok, this one was not too obvious but just pass it over the run cmd like:
and it will end up in 'create'
|
we are considering passing podman specific arguments using |
Hey there - I was looking to use environment-based secrets with |
@71ms1 sorry to ping on such an old thread but is there any reason for these checks with external secrets? I.e. I was just trying to map an external secret with source and target and (I think) ran afoul of this line: Relevant parts of compose look like so: services:
myService:
secrets:
- source: ExternalSecretName
target: LocalSecretName
secrets:
ExternalSecretName:
external: true The compose spec docs also don't say why this would not be allowed. |
Fixed in #971. |
Hi, I think that this issue should not be closed. PR #971 refers to target environment variables loaded with some secret value. The top-level "secrets" element in docker-compose admits the "environment" kind of secret so that the secret can be loaded from a environment variable to whatever target secret you want. For example:
In this case the runtime environment variable POSTGRES_PASSWORD is "converted" to the "postgres_password" secret, then used by the "db" container as a file secret. Finally, the "db" container reads the file with the secret value "/run/secrets/postgres_password" as indicated by the container environment variable POSTGRES_PASSWORD_FILE. |
Is your feature request related to a problem? Please describe.
The compose spec specifies that secrets can be read from the environment (https://github.com/compose-spec/compose-spec/blob/master/spec.md#secrets-top-level-element, list item
environment
), but as far as I can tell,devel
currently only supportsfile
podman-compose/podman_compose.py
Line 560 in 91bc6eb
external
/name
podman-compose/podman_compose.py
Line 596 in 91bc6eb
Describe the solution you'd like
podman-compose
should be able to load secrets from environment variablesAdditional context
Related issues: #655 #440 #589
The text was updated successfully, but these errors were encountered: