Re: [kubernetes-users] [Statefulset]Setting environment variables specific to each HOSTNAME loading from certain PATH mounted to container

2018-08-20 Thread ilter P
Hi, Thanks for the reply.. I managed to do it as per Rodrigo's recommendation 1- I loaded the configmaps into different paths by using HostName 2- I read the values from the paths before starting the image as following: - command: - sh - -exc - | export KAFKA_EXT_HOST=`cat

Re: [kubernetes-users] [Statefulset]Setting environment variables specific to each HOSTNAME loading from certain PATH mounted to container

2018-08-19 Thread Niranjan Kolly
Use hostpath directory mount if you have more than one config file for each env.. and use node antiaffinity. Thanks, Niranjan On Sat, Aug 18, 2018, 7:41 AM Rodrigo Campos wrote: > On Friday, August 17, 2018, ilter P wrote: > >> Hi Rodrigo, >> >> Thanks for the reply >> First of all this is

Re: [kubernetes-users] [Statefulset]Setting environment variables specific to each HOSTNAME loading from certain PATH mounted to container

2018-08-17 Thread Rodrigo Campos
On Friday, August 17, 2018, ilter P wrote: > Hi Rodrigo, > > Thanks for the reply > First of all this is stable external image and I dont want to maintain my > version. > Secondly, the values that I would like to get are created during my > deployment (ingress external host urls) and I can only

Re: [kubernetes-users] [Statefulset]Setting environment variables specific to each HOSTNAME loading from certain PATH mounted to container

2018-08-17 Thread ilter P
Hi Rodrigo, Thanks for the reply First of all this is stable external image and I dont want to maintain my version. Secondly, the values that I would like to get are created during my deployment (ingress external host urls) and I can only map them during container initializing. What i tried

Re: [kubernetes-users] [Statefulset]Setting environment variables specific to each HOSTNAME loading from certain PATH mounted to container

2018-08-17 Thread Rodrigo Campos
Sorry, what is thing number 1 you tried? Is that in the yaml or where? Not sure what you mean As a hack, can't you change your docker file to do on startup (CMD): export var=$(...); ./your-app ? Does it work? Probably, he simplest thing might be for the app to read the proper variable using it's

[kubernetes-users] [Statefulset]Setting environment variables specific to each HOSTNAME loading from certain PATH mounted to container

2018-08-17 Thread ilter P
Hi, I have statefulset which has specific configuration for each host. I created different Configmap with each hostname and mounted them under the path with the hostnames as following: /$(HOSTNAME)/* *I tried following options:* *1- OUTSIDE://$(eval cat ) . --> did not work* *2- exported