CausticLab / go-rancher-gen

:cow: Generate configuration files using templates and Rancher Metadata
MIT License
0 stars 2 forks source link

Adding notify-lbl functionality #3

Closed Munsio closed 7 years ago

Munsio commented 7 years ago

@emcniece The notify-cmd is now executed on the same container as the rancher-gen is running. Should we introduce a new config value for remote container command execution or should we use the normal notify-cmd config for that? If we use the normal notify-cmd you will never be able to use it on the rancher-gen container itself.

emcniece commented 7 years ago

It seems (to me) that adding outbound communication to this (the rancher-gen image) violates its design pattern - rancher-gen simply generates a text file based on some parameters. I don't think that it needs further modification to send signals out from the container.

If we stick with this paradigm we can PR this change back up to the parent project, and it might help us with separating concerns/functionality.

To obtain outbound communication, shared volumes (between sidekicks) might be the answer. A binary can be volumed into this container (from a controlling container, or from rancher-api) and the notify-cmd can execute it.