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

feat: filter containers to notify #619

Merged
merged 5 commits into from
May 17, 2024
Merged

feat: filter containers to notify #619

merged 5 commits into from
May 17, 2024

Conversation

buchdag
Copy link
Member

@buchdag buchdag commented May 16, 2024

This is a rebase and slight refactor of #549 (without behaviour change) + documentation.

Original description from @tarasov65536:

This PR gives ability to specify set of filters to containers query when new generated file arrived.

It is kinda similar to #311 but with better implementation from architectural point of view.

It introduces new command line argument -notify-filter that adds filter in list of filters to query containers that should be notified when generated file changed. Argument format as in docker api

For example:

docker-gen -notify-filter name=foo -notify-filter label=bar=baz ...

adds two filters to containers query.

Signal code still defined by argument -notify-signal.

As pointed out in the original PR, docker-gen is not structured to make this realistically unit testable, but it work as advertised and does not seem to introduce regressions.

Resolves #77

@buchdag buchdag self-assigned this May 16, 2024
@buchdag buchdag merged commit ec10ca2 into main May 17, 2024
3 checks passed
@buchdag buchdag deleted the feature/notify-filter branch May 17, 2024 14:40
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.

Allow -notify-sigup to work with docker-compose
2 participants