On Thu, Apr 21, 2016 at 06:39:52PM +0100, Rodrigo Campos wrote:
> On Thu, Apr 21, 2016 at 06:36:25PM +0100, Rodrigo Campos wrote:
> > I'm using heka in kubernetes and I'd like to use a configmap in different
> > projects so they can create some local heka configurations.
> > 
> > 
> > A configmap is mounted in a directory, just like a regular mount. And I 
> > have a
> > docker base image with some files and when running in kubernetes in a 
> > specific
> > project, I want to mount project-specific heka files with a configmap. But 
> > this
> > needs to be on a different directory (if not, the files in the base docker 
> > image
> > will not be visible). So, basically, there is no easy way to solve this.
> > 
> > There is a "postStart" hook in kubernetes that I can use to copy the config 
> > file
> > mounted somewhere else, to the heka config dir. But the problem with this is
> > that it is not guaranteed (docker does not support it) that it will be run
> > before starting heka. So, I can't really even do this hack.
> > 
> > Can you please consider adding some other dir to read config files or read
> > recursively in a directory? (so, I can do something like: hekad -c 
> > /etc/heka/
> > and I have /etc/heka/<config_dir_1> and /etc/heka/config_dir_2)
> 
> Ohh, forgot to say but I've seen this issue and commented there 9 days ago:
> https://github.com/mozilla-services/heka/issues/407

The workaround I'm using (but is not really nice) is to create a symlink in the
base docker image pointint to the file that will be mounted as a configmap.

This way, heka fails to start if the file is not there. But the ugly thing about
this is that I have a weird symlink in the heka base image and that I have to
create at least an empty file even if the project doesn't need any extra heka
config (the symlink needs to point to a valid file).



Thanks a lot,
Rodrigo
_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka

Reply via email to