telekom / das-schiff-network-operator

Configure netlink interfaces, simple eBPF filters and FRR using Kubernetes resources.
Apache License 2.0
28 stars 2 forks source link

Split network-operator-agent into agent and worker #124

Open p-strusiewiczsurmacki-mobica opened 4 months ago

p-strusiewiczsurmacki-mobica commented 4 months ago

This PR introduces changes discussed in #121

Based on #110 and #112.

in this PR reconciler interfaces from #112 were renamed to Adapters and are now contained in separate packages. Additionally new pod Agent was added that uses the adapters to configure the netwokring on the host. Based on gradual rollout #110, the workflow looks currently like this:

  1. Leader-elected network-operator-configurator watches CRDs and creates per node config (NodeConfig).
  2. On each node network-operator-worker pod watches for NodeConfigs and if there is node config created for the node it serializes it and sends it via gRPC (localhost:50042 by default) to the agent.
  3. Agent (whcihc can be run as a pod or as standalone binary) is a gRPC server - it gets the config from the worker and configures networking, and does perform configuration-specific healthchecks (e.g. checks if FRR is active).
  4. After worker gets success response form the agent it's go on with common connectivity healthchecks and sets the NodeConfig resource provisioning status.

Update 02.10.2024: rebased to current gradual-rollout implementation.