[Feature] Specify sensitive config values via environment variables #14815
Replies: 5 comments 13 replies
-
The workarounds you suggest are already perfectly serviceable approaches, no? |
Beta Was this translation helpful? Give feedback.
-
We discussed this in the team and decided against adding support in Immich, since there are already plenty of good approaches to storing config as a secret or templating it out with things like |
Beta Was this translation helpful? Give feedback.
-
If anyone is trying to figure out how to do this with Nix, I did a workaround here: Proper support from Immich side would still be very much desirable :) |
Beta Was this translation helpful? Give feedback.
-
If you are using sops with nixos, I have an example how to do it as well; Downside of this is, we circumvent code in upstream nixpkgs repo. There may be some smart useful bits, where it is looking to There is no such functionality in the upstream yet, but there may be in the future. |
Beta Was this translation helpful? Give feedback.
-
Here's a way to solve the problem with Kubernetes. I use an init container to run envsubst on the config file from the readonly configmap. It outputs the result in an emptyDir volume mounted by both init and main containers. The "templated" configmap is the one I provide to immich main container with the IMMICH_CONFIG_FILE env var. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have searched the existing feature requests to make sure this is not a duplicate request.
The feature
Currently, config can be provided via UI or json file.
Some config values, like
oauth.clientSecret
orsmtp.password
are sensitive. It would be nice to provide these values using environment variables. That will be useful for declarative Immich setup using gitops.Possible implementations:
Immich then should replace clientSecret with the value of
IMMICH_OAUTH_CLIENT_SECRET
env.IMMICH_CONFIG_oauth_clientSecret
env will overrideoauth.clientSecret
key.The current workaround is templating externally, e.g. with init container before Immich starts or using secrets manager templating capabilities.
Platform
Beta Was this translation helpful? Give feedback.
All reactions