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: add support for "none" scope #1800

Merged
merged 2 commits into from
Oct 21, 2023
Merged

feat: add support for "none" scope #1800

merged 2 commits into from
Oct 21, 2023

Conversation

piksel
Copy link
Member

@piksel piksel commented Oct 14, 2023

This PR adds a special "none" scope to watchtower that matches containers without a scope label, a scope label set to none, or a scope label set to an empty string (com.centurylinklabs.watchtower.scope=).

Effectively, this enables you to run both scoped and unscoped version of watchtower simultaneously.

Fixes #1788
Fixes #1541

@codecov
Copy link

codecov bot commented Oct 14, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (72e437f) 69.23% compared to head (e539199) 69.42%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1800      +/-   ##
==========================================
+ Coverage   69.23%   69.42%   +0.19%     
==========================================
  Files          26       26              
  Lines        2467     2473       +6     
==========================================
+ Hits         1708     1717       +9     
+ Misses        661      659       -2     
+ Partials       98       97       -1     
Files Coverage Δ
pkg/filters/filters.go 93.38% <91.66%> (+2.95%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@piksel piksel requested a review from simskij October 14, 2023 10:40
@piksel piksel merged commit dd54055 into main Oct 21, 2023
11 checks passed
@piksel piksel deleted the feat/none-scope branch October 21, 2023 18:57
@owine
Copy link

owine commented Oct 26, 2023

Thanks for this feature!

I am noticing that on a restart of my watchtower with scope none it is cleaning up my other watchtower instances that have defined scopes.

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

Successfully merging this pull request may close these issues.

Watchtower instance closing if one instance with one without scope Allow Ignore of Specific Scope(s)
2 participants