-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Refactor watchers - Create separate type for namespaced informers #3238
Conversation
3ce2802
to
10de92c
Compare
Codecov Report
@@ Coverage Diff @@
## main #3238 +/- ##
==========================================
+ Coverage 52.48% 52.67% +0.18%
==========================================
Files 59 59
Lines 16104 16107 +3
==========================================
+ Hits 8452 8484 +32
+ Misses 7372 7341 -31
- Partials 280 282 +2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
10de92c
to
07cc09f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
10a5619
to
178d133
Compare
178d133
to
7ec801c
Compare
…inx#3238) * Create separate type for namespaced watchers * Create separate type for namespaced watchers in certmanager controller * Create separate type for namespaced watchers in extdns controller * Fix case where namespace is not watching secrets
Proposed changes
Refactor namespaced watchers. This change creates a new namespacedInformer types in controller.go, and in the certmanager and externaldns controllers.
This simplifies the logic a bit, and allows breaking up larger methods into smaller methods/ functions.
Additionally, it also provides a base for creating new or deleting unused namespacedInformers during runtime, which could allow future dynamic updating of which namespaces are watched.
Checklist
Before creating a PR, run through this checklist and mark each as complete.