Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support swarm service labels when using filter.labels #443

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

erbrecht
Copy link

If a container was started by a swarm service, this additionally checks the service labels in the MatchContainer function. It also looks at service labels when deciding whether to ignore a container based on labels. This approach doesn't require any special configuration, it should just work seamlessly whether containers are started individually or as part of a service or stack.

Travis Collins added 2 commits August 16, 2019 20:53
…ill listens to log events from individual containers
@erbrecht
Copy link
Author

After submitting this, I realized that the IgnoreContainer function in pump.go should probably accept a *docker.Container and *swarm.Service instead of *docker.Container and map[string]string of labels. I think it makes more sense for them to be similar types. I made these changes in my repo and they pass the tests but I haven't pushed them yet. I wanted to see if there was any feedback on this first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants