[refactor] Split felix server into watcher/handler#772
Open
Conversation
0354524 to
adbe7fe
Compare
adbe7fe to
68c4d11
Compare
68c4d11 to
172b238
Compare
172b238 to
34b4725
Compare
hedibouattour
requested changes
Oct 21, 2025
| return r, nil | ||
| } | ||
|
|
||
| func (h *HostEndpoint) GetHostPolicies(state *PolicyState, tiers []Tier) (conf *types.InterfaceConfig, err error) { |
Collaborator
There was a problem hiding this comment.
maybe move this one as well to handler to be consistent with wep endpoint getpolicies
calico-vpp-agent/common/types.go
Outdated
| NewState FelixSocketSyncState | ||
| } | ||
|
|
||
| type ServiceAndEndpoints struct { |
Collaborator
There was a problem hiding this comment.
these slipped in from another one ?
| Networks map[uint32]*common.NetworkDefinition | ||
| NetworkDefinitions map[string]*common.NetworkDefinition | ||
| IPPoolMap map[string]*proto.IPAMPool | ||
| RedirectToHostClassifyTableIndex uint32 |
Collaborator
There was a problem hiding this comment.
I think this shouldn't be part of this change. Or maybe remove it from cni server
Comment on lines
40
to
41
| VppAvailableBuffers uint64 | ||
| NumDataThreads int |
Collaborator
There was a problem hiding this comment.
same for these two.
This patch splits the felix server in two pieces: - a felix watcher placed under `agent/watchers/felix` - a felix server placed under `agent/felix` The former will have only the responsibility of watching and submitting events into a single event queue. The latter will receive the event in a single goroutine and proceed to program VPP as a single thred. The intent is to move away from a model with multiple servers replicating state and communicating over a pubsub. This being prone to race conditions, deadlocks, and not providing many benefits as scale & asynchronicity will not be a constraint on nodes with relatively small number of pods (~100) as is k8s default. Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
34b4725 to
c93538b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch splits the felix server in two pieces:
agent/watchers/felixagent/felixThe former will have only the responsibility of watching
and submitting events into a single event queue.
The latter will receive the event in a single goroutine
and proceed to program VPP as a single thred.
The intent is to move away from a model with multiple servers
replicating state and communicating over a pubsub. This being
prone to race conditions, deadlocks, and not providing many
benefits as scale & asynchronicity will not be a constraint
on nodes with relatively small number of pods (~100) as is k8s
default.