Fork me on GitHub
#duct
<
2018-03-21
>
Arun02:03:26

Hi guys, i’m having a bit of a hiccup right now with environment variables, for whatever reason the config file doesn’t seem to recognize my POSTGRES_PASSWORD even when I ref it as #duct/env ["POSTGRES_PASSWORD"] or #duct/env "POSTGRES_PASSWORD"]

Arun02:03:04

The config map keeps returning nil even when I set the environment variable on my local machine

weavejester02:03:43

How are you setting the environment variable?

Arun02:03:05

echo $POSTGRES_PASSWORD='hello'

Arun02:03:08

as an example

Arun02:03:22

the big issue i’m having is that it’s not picking up the environment variable from the k8s secret

weavejester02:03:42

echo $POSTGRES_PASSWORD='hello' won’t set the environment variable.

weavejester02:03:57

You want something more like POSTGRES_PASSWORD=hello lein run

Arun02:03:54

Sorry, that’s what I meant to say. If did something like echo $POSTGRES_PASSWORD, it’ll print correctly

weavejester02:03:45

I think I’d need to see more of how you set it up. Duct is just calling System/getenv

Arun02:03:17

Okay, I think i’m onto something right now, I’ll see how it goes. Thanks for the help @weavejester

dadair02:03:05

@arundilipan could you provide a sample snippet from your config map where you try to get the env var?

Arun03:03:15

@dadair I figured it out, it had something to do with my k8s config