Good morning! what is the best way to configure a ...
# kubernetes
s
Good morning! what is the best way to configure a container environment with pulumi? Obviously it will contain secrets so it cant be committed to git, is there a way to persist the config and then pass it to the container? Also, on a code level, how can I "mass" pass the variables without creating them one by one in the code?
b
Morning @sparse-butcher-73713 - you are actually able to commit secrets to git if you put them inside the config:
Copy code
pulumi config set <key> <value> -- secret
s
whoah - so pulumi will encrypt them? with the pulumi key or the configured provider?
b
by default, it'll be a key configured by pulumi, but you can encrypt them with an aws kms key, google cloud key or azure kms key when you create the stack https://www.pulumi.com/blog/peace-of-mind-with-cloud-secret-providers/
s
Ok got it
it there any short hand way to transfer all key-values from config to the container environment variables?
or just put them in one by one
?
also I couldn't find any examples on how to use
EnvFrom
in
ContainerArgs
which sounds like could be it
b
and then pass the configuration object to the container
s
mmm yes, interesting - use a JsonObject