added the ability to include only container having label using INCLUDE_LABEL param#222
added the ability to include only container having label using INCLUDE_LABEL param#222mohamed-el-habib wants to merge 3 commits intogliderlabs:masterfrom mohamed-el-habib:master
Conversation
|
Don't we have this somewhere already? |
|
Maybe i missed that, but as i saw there are some things similar when logs are routed, but no things when logs are pumped. |
router/pump.go
Outdated
| includeLabel := getopt("INCLUDE_LABEL", "") | ||
| if includeLabel != "" { | ||
| if _, ok := container.Config.Labels[includeLabel]; ok { | ||
| // include all containers that have the includeLabel |
There was a problem hiding this comment.
Comments shouldn't be necessary, and if they are, the code needs to be made more clear.
|
@josegonzalez : I simplified the code as i can (i my first time with golang), and updated the README.md. |
|
@josegonzalez did my code need documentation ? |
|
what's the difference between this vs the filter approach? |
|
May be, misunderstood the filter approach. My use case is to have a docker-compose file with a list of containers for my application. And I want to add logspout container to this compose file. I want logspout to load only the compose container 's logs and expose them throw http module. How can I do that using filter approach. |
|
@MattAitchison @josegonzalez Thoughts on having both |
Added the ability to include only container having label using INCLUDE_LABEL param (Same as EXCLUDE_LABEL). I'm using this feature to use logspout container into docker-compose.yml. add expose log of others services throw http