Update tap targets over ws (#901)

Update tappers via websocket instead of by env var. This way the DaemonSet doesn't have to be applied just to notify the tappers that the tap targets changed. The number of tapper restarts is reduced. The DaemonSet still gets applied when there is a need to add/remove a tapper from a node.
This commit is contained in:
Nimrod Gilboa Markevich
2022-03-23 13:50:33 +02:00
committed by GitHub
parent 41a7587088
commit a5c35d7d90
15 changed files with 242 additions and 84 deletions

View File

@@ -59,7 +59,6 @@ var memprofile = flag.String("memprofile", "", "Write memory profile")
type TapOpts struct {
HostMode bool
FilterAuthorities []v1.Pod
}
var extensions []*api.Extension // global
@@ -90,12 +89,6 @@ func StartPassiveTapper(opts *TapOpts, outputItems chan *api.OutputChannelItem,
extensions = extensionsRef
filteringOptions = options
if opts.FilterAuthorities == nil {
tapTargets = []v1.Pod{}
} else {
tapTargets = opts.FilterAuthorities
}
if *tls {
for _, e := range extensions {
if e.Protocol.Name == "http" {