Expose all env vars to app container. #263

Merged
moritz merged 4 commits from moritz/abra:expose_envs into main 2023-01-31 14:13:44 +00:00
Member

Resolves coop-cloud/organising#393 and is required for the auto updater coop-cloud/organising#236 (comment)

Resolves https://git.coopcloud.tech/coop-cloud/organising/issues/393 and is required for the auto updater https://git.coopcloud.tech/coop-cloud/organising/issues/236#issuecomment-15390
decentral1se approved these changes 2023-01-31 13:05:19 +00:00
decentral1se left a comment
Owner

Awesome! I think we should be very loud on the release of this change to help people not get caught by the assumption that env vars should have no secrets. We want to avoid this kind of sadness for sure. I can write it up on the release documentation. Thanks!

Awesome! I think we should be very loud on the release of this change to help people not get caught by the assumption that env vars should have no secrets. We want to avoid this kind of sadness for sure. I can write it up on the release documentation. Thanks!
@ -449,1 +449,4 @@
}
// expose all env variables to the app container
func ExposeAllEnv(compose *composetypes.Config, appEnv AppEnv) {
Owner
// ExposeAllEnv ...
```go // ExposeAllEnv ... ```
moritz marked this conversation as resolved
@ -450,0 +452,4 @@
func ExposeAllEnv(compose *composetypes.Config, appEnv AppEnv) {
for _, service := range compose.Services {
if service.Name == "app" {
logrus.Debug("Add the following environment to the app service config:")
Owner

Perhaps include the app / service / etc. info in the log message? Whatever seems appropriate.

Perhaps include the app / service / etc. info in the log message? Whatever seems appropriate.
moritz marked this conversation as resolved
@ -450,0 +458,4 @@
if !exists {
value := v
service.Environment[k] = &value
logrus.Debugf("Add Key: %s Value: %s", k, value)
Owner

Same here, with some marker on the recipe/app/etc. perhaps?

Same here, with some marker on the recipe/app/etc. perhaps?
moritz marked this conversation as resolved
moritz force-pushed expose_envs from 1e2caec3a3 to 1c9a931143 2023-01-31 13:37:55 +00:00 Compare
moritz added 1 commit 2023-01-31 14:12:12 +00:00
resolve PR: include the servic info in the log message
Some checks failed
continuous-integration/drone/pr Build is failing
81c6caf8ee
moritz merged commit ca1ea32c46 into main 2023-01-31 14:13:44 +00:00
moritz deleted branch expose_envs 2023-01-31 14:13:52 +00:00
Sign in to join this conversation.
No description provided.