🐛 fix webhook injector#316
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mengqiy If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
cc: @kdada |
|
can you provide a bit more detail in the PR description/commit message? Otherwise LGTM |
aa84331 to
859819e
Compare
Done. Updated both. |
| s.sMux.Handle(webhook.GetPath(), webhook.Handler()) | ||
|
|
||
| // Inject dependencies into each webhook | ||
| if err := s.manager.SetFields(webhooks[i]); err != nil { |
There was a problem hiding this comment.
Interesting... Won't manager call SetField on webhook server and that should call the inject field for each of the webhooks ? because manager knows when all the deps are resolved ?
There was a problem hiding this comment.
yeah, this should be receiving an injectfunc, which it should be using to inject things, as opposed to having a reference to the manager.
859819e to
c5c7205
Compare
c5c7205 to
47a7b28
Compare
…face for webhooks
47a7b28 to
a4ef929
Compare
|
The first 2 commits are from #300. |
| WithManager(mgr). | ||
| ForType(&corev1.Pod{}). | ||
| Handlers(&podAnnotator{}). | ||
| Build() |
There was a problem hiding this comment.
This looks a lot simpler now :)
drop server name and client fix injector
|
Closing since the commit will be in #300. |
fixes #309
Based on #300.
use
mgr.SetFields()for webhook server and implementInjectorinterface for webhooks.